Re: [PATCH] blockdev: Remove the --setbsz (set blocksize) option which has never worked.

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

 



On Tue, Oct 08, 2013 at 04:56:23PM +0100, Pádraig Brady wrote:
> For my own reference, the way I see it,
> when accessing block devices Linux uses these block sizes:
> 
> physical	defined by the hardware device
> logical		the smallest addressable unit used for the device
> file system	ditto for the file system
> 
> --[gs]etbsz refers the _logical_ block size for the device.

 Well, let's be more pedantic ;-)

 The disks and raids provides I/O limits:

   physical block size  (BLKPBSZGET)
   logical block size   (BLKSSZGET)

 but kernel also uses 
 
   soft block size  BLKBSZGET
   
 this size is never smaller than logical size and (I guess) usually
 same as PAGE_SIZE. So it's really not *device* logical block size,
 it's more about the way how kernel uses the device.

> So why might one want to --setbsz?
> I agree that would be fairly specialized.

 Yes, it's practically useless in tool like blockdev(8).
 
> I searched for uses of --setbz and noticed a couple:
> Perf testing:
>   https://lkml.org/lkml/2003/12/30/81
> Functionality testing:
>   http://www.linux-archive.org/device-mapper-development/699549-blockdev-fix-crash-when-block-size-changed-i-o-issued-simultaneously.html

 Good point (it seems I was too rash to apply Rich's patch;-)

 Maybe we can keep --setbsz in the code for testing purpose and for
 backward compatibility, then all we need is describe the ioctl in the
 blockdev(8) man page.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux