summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-08-23 19:10:30 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-23 12:49:52 -0600
commit807d4af2f64ed79fdbb28e582e330be3dbe10d23 (patch)
tree11ed994bb09f7739c8d746f8d39b82df07aa7740 /block/blk.h
parentde65b0123216a8e1dbe3ca1eb20a45572b9e71d9 (diff)
downloadlwn-807d4af2f64ed79fdbb28e582e330be3dbe10d23.tar.gz
lwn-807d4af2f64ed79fdbb28e582e330be3dbe10d23.zip
block: add a __disk_get_part helper
This helper allows looking up a partion under RCU protection without grabbing a reference to it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index 3a3d715bd725..fde8b351c166 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -204,6 +204,8 @@ static inline void elv_deactivate_rq(struct request_queue *q, struct request *rq
e->type->ops.sq.elevator_deactivate_req_fn(q, rq);
}
+struct hd_struct *__disk_get_part(struct gendisk *disk, int partno);
+
#ifdef CONFIG_FAIL_IO_TIMEOUT
int blk_should_fake_timeout(struct request_queue *);
ssize_t part_timeout_show(struct device *, struct device_attribute *, char *);