On 13/05/10 11:42, Karel Zak wrote: > On Thu, May 13, 2010 at 10:35:47AM +0100, Pádraig Brady wrote: >> On 13/05/10 09:31, Karel Zak wrote: >>> >>> The blklimits program is the command-line interface to working with >>> I/O topology support in the libblkid library. For example: >>> >>> # blklimits /dev/sdb >>> alignment offset: 0 >>> minimum io size: 4096 >>> optimal io size: 32768 >>> logical sector size: 512 >>> physical sector size: 4096 >> >> Could you mention why you chose to have a separate command >> rather than adding extra options to `blockdev`? > > Good point. > > The blockdev already supports topology ioctls, but libblkid provides > more portable API. The ioctls are supported since kernel 2.6.32, and > the stuff is exported by /sys since 2.6.31. The libblkid is able to > read the information directly from DM, MD, LVM and EVMS on older > kernels. The library provides unified API for all these probing > methods and we need any command-line interface for this functionality > (for fdisk/parted, mkfs debugging etc.). Thanks for that info. > > I'm not sure if link blockdev(8) against libblkid is a good idea. > From my point of view is blockdev(8) simple wrapper for ioctls. > > (I'm not happy with another new command, so suggestions are welcomed.) blockdev currently just uses ioctls but I don't see a problem linking with libblkid if available and {add,merg}ing the new options if so. So in summary I would change the blockdev description from: "blockdev - call block device ioctls from the command line" to: "blockdev - query or change block device parameters" cheers, Pádraig. -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html