Re: [PATCH 1 of 3] block: Export I/O hints for block devices and partitions | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Thu, 2008-06-05 at 01:22 -0400, Martin K. Petersen wrote:
> 3 files changed, 74 insertions(+)
> block/genhd.c | 39 +++++++++++++++++++++++++++++++++++++++
> fs/partitions/check.c | 11 +++++++++++
> include/linux/genhd.h | 24 ++++++++++++++++++++++++
This looks good. However, the first observation I would have is that
the hints should be extensible without disrupting existing code.
Something like
enum disk_hint {
DISK_HINT_OFFSET,
DISK_HINT_BLOCK,
DISK_HINT_LEN,
};
void disk_set_io_hints(struct gendisk *disk, enum disk_hint hint, u64 value) {
switch (hint) {
case DISK_HINT_OFFSET:
disk->phys_offset = (sector_t)val;
break;
...
etc.
Because I can just bet we will find other hints that people want adding.
I'm also not entirely sure that zero should be the no-hint value, but I
could be persuaded on that because I can't see a case where setting zero
to mean I'm telling you I definitely don't care should be different from
not setting it.
James
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Kernel Newbies] [Share Photos] [IDE] [Security] [Git] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Linux ATA RAID] [Samba] [Video 4 Linux] [Device Mapper] [Linux Resources]
![]() |