aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-15 14:09:29 -0400
committerJens Axboe <jens.axboe@oracle.com>2010-05-21 14:01:02 -0400
commitc3e33e043f5e9c583aa59d5591a614b2a8243d3a (patch)
treefe8fef91dafb670fad1f433ae48514472b8d23e5 /include/linux/blkdev.h
parent56bca01738733709bef076e2e97bbd01e5659f24 (diff)
block,ide: simplify bdops->set_capacity() to ->unlock_native_capacity()
bdops->set_capacity() is unnecessarily generic. All that's required is a simple one way notification to lower level driver telling it to try to unlock native capacity. There's no reason to pass in target capacity or return the new capacity. The former is always the inherent native capacity and the latter can be handled via the usual device resize / revalidation path. In fact, the current API is always used that way. Replace ->set_capacity() with ->unlock_native_capacity() which take only @disk and doesn't return anything. IDE which is the only current user of the API is converted accordingly. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 346fd4856733..be411c12ebbe 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1330,8 +1330,7 @@ struct block_device_operations {
1330 int (*direct_access) (struct block_device *, sector_t, 1330 int (*direct_access) (struct block_device *, sector_t,
1331 void **, unsigned long *); 1331 void **, unsigned long *);
1332 int (*media_changed) (struct gendisk *); 1332 int (*media_changed) (struct gendisk *);
1333 unsigned long long (*set_capacity) (struct gendisk *, 1333 void (*unlock_native_capacity) (struct gendisk *);
1334 unsigned long long);
1335 int (*revalidate_disk) (struct gendisk *); 1334 int (*revalidate_disk) (struct gendisk *);
1336 int (*getgeo)(struct block_device *, struct hd_geometry *); 1335 int (*getgeo)(struct block_device *, struct hd_geometry *);
1337 struct module *owner; 1336 struct module *owner;