summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2023-04-14 16:32:02 +0300
committerJens Axboe <axboe@kernel.dk>2023-04-16 22:01:42 +0300
commit9f4107b07b17b5ee68af680150f91227bea2df6f (patch)
tree54f7074442e4411c2770e09724b288422b95d2e6 /include
parent3838c406a594f15600ad6f83c1e3b16bfd1829d0 (diff)
downloadlinux-9f4107b07b17b5ee68af680150f91227bea2df6f.tar.xz
block: store bdev->bd_disk->fops->submit_bio state in bdev
We have a long chain of memory dereferencing just to whether or not this disk has a special submit_bio helper. As that's not necessarily the common case, add a bd_has_submit_bio state in the bdev to avoid traversing this memory dependency chain if we don't need to. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blk_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index c1da616fadae..3e8e9a97de46 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -47,6 +47,7 @@ struct block_device {
bool bd_read_only; /* read-only policy */
u8 bd_partno;
bool bd_write_holder;
+ bool bd_has_submit_bio;
dev_t bd_dev;
atomic_t bd_openers;
spinlock_t bd_size_lock; /* for bd_inode->i_size updates */