2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/block
Ryan Harper a5eb9e4ff1 virtio_blk: Add 'serial' attribute to virtio-blk devices (v2)
Create a new attribute for virtio-blk devices that will fetch the serial number
of the block device.  This attribute can be used by udev to create disk/by-id
symlinks for devices that don't have a UUID (filesystem) associated with them.

ATA_IDENTIFY strings are special in that they can be up to 20 chars long
and aren't required to be nul-terminated.  The buffer is also zero-padded
meaning that if the serial is 19 chars or less that we get a nul-terminated
string.  When copying this value into a string buffer, we must be careful to
copy up to the nul (if it present) and only 20 if it is longer and not to
attempt to nul terminate; this isn't needed.

Changes since v1:
- Added BUILD_BUG_ON() for PAGE_SIZE check
- Removed min() since BUILD_BUG_ON() handles the check
- Replaced serial_sysfs() by copying id directly to buffer

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: john cooper <john.cooper@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-08-05 13:05:30 +09:30
..
aoe include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
drbd Merge branch 'master' into for-next 2010-08-04 15:14:38 +02:00
paride Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block 2010-04-09 11:50:29 -07:00
amiflop.c m68k: amiga - Floppy platform device conversion 2010-05-17 21:37:45 +02:00
ataflop.c ataflop: Killl warning about unused variable flags 2010-02-27 18:27:15 +01:00
brd.c brd: support discard 2010-06-01 11:09:20 +02:00
cciss_cmd.h cciss: detect bad alignment of scsi commands at build time 2010-02-28 19:42:31 +01:00
cciss_scsi.c cciss: set SCSI max cmd len to 16, as default is wrong 2010-06-15 08:12:34 +02:00
cciss_scsi.h cciss: remove C99-style comments 2010-02-22 13:44:45 +01:00
cciss.c block: cciss: use ARRAY_SIZE 2010-07-20 17:02:03 +02:00
cciss.h cciss: do not use void pointer for scsi hba data 2010-02-28 19:42:32 +01:00
cpqarray.c cpqarray: fix two more wrong section type 2010-06-14 15:21:33 +02:00
cpqarray.h
cryptoloop.c drivers: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:32 -04:00
DAC960.c block: Finalize conversion of block limits functions 2010-03-15 12:47:59 +01:00
DAC960.h Fix DAC960 driver on machines which don't support 64-bit DMA 2007-09-11 17:21:19 -07:00
floppy.c drivers/block/floppy.c: remove unnecessary casting in fd_ioctl 2010-03-12 15:52:31 -08:00
hd.c Merge commit 'v2.6.34-rc6' into core/locking 2010-05-03 09:17:01 +02:00
ida_cmd.h
ida_ioctl.h
Kconfig paride: fix menu indentation 2010-05-11 09:02:55 +02:00
loop.c sanitize vfs_fsync calling conventions 2010-05-21 18:31:21 -04:00
Makefile The DRBD driver 2009-10-01 21:17:49 +02:00
mg_disk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
nbd.c update email address 2010-07-19 10:56:54 +02:00
osdblk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pktcdvd.c pktcdvd: improve BKL and compat_ioctl.c usage 2010-04-29 08:44:37 -07:00
ps3disk.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
ps3vram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
smart1,2.h
sunvdc.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
swim3.c powerpc/macio: Fix probing of macio devices by using the right of match table 2010-06-02 17:50:38 +10:00
swim_asm.S m68k: mac - Add SWIM floppy support 2009-03-26 21:15:27 +01:00
swim.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sx8.c block: Consolidate phys_segment and hw_segment limits 2010-02-26 13:58:08 +01:00
ub.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
umem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
umem.h drivers/block/umem: trim trailing whitespace 2007-10-10 09:25:59 +02:00
viodasd.c Merge branch 'for-2.6.34' of git://git.kernel.dk/linux-2.6-block 2010-03-01 09:00:29 -08:00
virtio_blk.c virtio_blk: Add 'serial' attribute to virtio-blk devices (v2) 2010-08-05 13:05:30 +09:30
xd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xd.h [PATCH] switch xd 2008-10-21 07:48:11 -04:00
xen-blkfront.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xsysace.c of: Remove duplicate fields from of_platform_driver 2010-05-22 00:10:40 -06:00
z2ram.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00