summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2025-04-23 12:53:57 -0700
committerJens Axboe <axboe@kernel.dk>2025-04-23 13:58:06 -0600
commite03463d247ddac66e71143468373df3d74a3a6bd (patch)
treeccfa461bcf8fce4344aa3332801ce70f0df23fce /include
parentc0e473a0d226479e8e925d5ba93f751d8df628e9 (diff)
block: hoist block size validation code to a separate function
Hoist the block size validation code to bdev_validate_blocksize so that we can call it from filesystems that don't care about the bdev pagecache manipulations of set_blocksize. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/174543795720.4139148.840349813093799165.stgit@frogsfrogsfrogs Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e39c45bc0a97..c6b478cfb32d 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1614,6 +1614,7 @@ static inline void bio_end_io_acct(struct bio *bio, unsigned long start_time)
return bio_end_io_acct_remapped(bio, start_time, bio->bi_bdev);
}
+int bdev_validate_blocksize(struct block_device *bdev, int block_size);
int set_blocksize(struct file *file, int size);
int lookup_bdev(const char *pathname, dev_t *dev);