summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-01-23 14:26:46 +0100
committerChristian Brauner <brauner@kernel.org>2024-02-25 12:05:27 +0100
commita56aefca8d386181415a1fb7cfec2f72b0404797 (patch)
tree94defbadef364f43e6265a641a3a50cae9ea8124 /block/blk.h
parentb1211a25c4fe3443cfef4ed7c39251502a663776 (diff)
bdev: make struct bdev_handle private to the block layer
Link: https://lore.kernel.org/r/20240123-vfs-bdev-file-v2-29-adbd023e19cc@kernel.org Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/block/blk.h b/block/blk.h
index c9630774767d..19b15870284f 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -25,6 +25,12 @@ struct blk_flush_queue {
struct request *flush_rq;
};
+struct bdev_handle {
+ struct block_device *bdev;
+ void *holder;
+ blk_mode_t mode;
+};
+
bool is_flush_rq(struct request *req);
struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
@@ -517,7 +523,7 @@ static inline int req_ref_read(struct request *req)
}
void bdev_release(struct bdev_handle *handle);
-struct bdev_handle *bdev_open_by_dev(dev_t dev, blk_mode_t mode, void *holder,
- const struct blk_holder_ops *hops);
-
+int bdev_open(struct block_device *bdev, blk_mode_t mode, void *holder,
+ const struct blk_holder_ops *hops, struct file *bdev_file);
+int bdev_permission(dev_t dev, blk_mode_t mode, void *holder);
#endif /* BLK_INTERNAL_H */