* Kay Sievers <kay.sievers@xxxxxxxx> [2010-06-14 03:55]: > On Thu, Jun 10, 2010 at 21:16, Ryan Harper <ryanh@xxxxxxxxxx> wrote: > > Use the 'VBID' virtio-blk ioctl to extract drive serial numbers > > to be used for building disk/by-id symlinks. After extracting > > the serial number of the device it prints out the minimum info > > needed in a similar format to `scsi_id --export` so that the > > persistent-storage rules can process the serial information. > > > > This program depends on the virtio-blk serial device patches posted > > here[1] being applied to qemu and linux-kernel. > > > > Here is what the output looks like: > > > > % ./virtioblk_id /dev/vdb > > ID_VIRTIO=1 > > ID_TYPE=disk > > ID_SERIAL=QM00001 > > ID_SERIAL_SHORT=QM00001 > > As requested in the ealier mail. Please provide a good reason why the > kernel code can not create a "serial" file (or whatever fits your > needs) in sysfs at the block device. I didn't see you respond John's email: http://www.spinics.net/lists/hotplug/msg03869.html which included quite bit of the gory history on this topic. > > Other subsystems are doing the same thing like: > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/mmc/core/mmc.c;h=89f7a25b7ac12ab17f7baa9a18e0d980fe1c50eb;hb=HEAD#l270 > > We don't like to accumulate special purpose tools based on rather > weird ioctls for newly developed stuff, which can be replaced with a > few obviously and generally useful lines of code in the kernel driver. > > As I think the general direction of solving the problem you describe > is fundamentally wrong, I'll apply this only, if there are valid > reasons not to add this to sysfs. > > Thanks, > Kay -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@xxxxxxxxxx -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html