]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] Add block_device_operations.getgeo block device method
authorChristoph Hellwig <hch@lst.de>
Sun, 8 Jan 2006 09:02:50 +0000 (01:02 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:13:54 +0000 (20:13 -0800)
commita885c8c4316e1c1d2d2c8755da3f3d14f852528d
treee4f4e7a7657c0944d11c259f8f17ffcd6b2da0f5
parent5b0ed2c64d8fdafb5fcfb3baabdd288628b1ff9b
[PATCH] Add block_device_operations.getgeo block device method

HDIO_GETGEO is implemented in most block drivers, and all of them have to
duplicate the code to copy the structure to userspace, as well as getting
the start sector.  This patch moves that to common code [1] and adds a
->getgeo method to fill out the raw kernel hd_geometry structure.  For many
drivers this means ->ioctl can go away now.

[1] the s390 block drivers are odd in this respect.  xpram sets ->start
    to 4 always which seems more than odd, and the dasd driver shifts
    the start offset around, probably because of it's non-standard
    sector size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@suse.de>
Cc: <mike.miller@hp.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
30 files changed:
arch/um/drivers/ubd_kern.c
block/ioctl.c
drivers/acorn/block/mfmhd.c
drivers/block/DAC960.c
drivers/block/acsi.c
drivers/block/amiflop.c
drivers/block/aoe/aoeblk.c
drivers/block/cciss.c
drivers/block/cpqarray.c
drivers/block/floppy.c
drivers/block/paride/pd.c
drivers/block/paride/pf.c
drivers/block/ps2esdi.c
drivers/block/sx8.c
drivers/block/umem.c
drivers/block/viodasd.c
drivers/block/xd.c
drivers/ide/ide-disk.c
drivers/ide/ide-floppy.c
drivers/ide/ide.c
drivers/ide/legacy/hd.c
drivers/md/md.c
drivers/message/i2o/i2o_block.c
drivers/mmc/mmc_block.c
drivers/mtd/mtd_blkdevs.c
drivers/s390/block/dasd.c
drivers/s390/block/dasd_ioctl.c
drivers/s390/block/xpram.c
drivers/scsi/sd.c
include/linux/fs.h