Block I/O sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

   I've added a jprobe to generic_make_request and am print(k)ing the
bio->bi_sector and
   bio_sectors(bio) for every bio.

   I expected that for every bio thus printed the bi_sector would be
in terms of sector size.
   But this is apparently not the case.

    When any fs i/o is done, the bi_sector value is in terms of fs
block size and not sector size (for the block device). When i perform
raw i/o to the device ( dd for eg ), bi_sector is in terms of sectors
and not fs blocks.

    In both the cases though, bio_sectors(bio) returns the amount of
data written in sectors.

To me this is rather strange. Should it not be in terms of sector size always ?
 Can someone please explain ?

Thanks
-BD
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux