summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-08-11 12:08:24 +0200
committerChristian Brauner <brauner@kernel.org>2023-08-21 14:35:31 +0200
commit560e20e4bf6484a0c12f9f3c7a1aa55056948e1e (patch)
tree5ab5a370c9ef1622f2c5711d75dd47e69d9a7dfa /fs/super.c
parentblock: drop the "busy inodes on changed media" log message (diff)
downloadlinux-560e20e4bf6484a0c12f9f3c7a1aa55056948e1e.tar.xz
linux-560e20e4bf6484a0c12f9f3c7a1aa55056948e1e.zip
block: consolidate __invalidate_device and fsync_bdev
We currently have two interfaces that take a block_devices and the find a mounted file systems to flush or invaldidate data on it. Both are a bit problematic because they only work for the "main" block devices that is used as s_dev for the super_block, and because they don't call into the file system at all. Merge the two into a new bdev_mark_dead helper that does both the syncing and invalidation and which is properly documented. This is in preparation of merging the functionality into the ->mark_dead holder operation so that it will work on additional block devices used by a file systems and give us a single entry point for invalidation of dead devices or media. Note that a single standalone fsync_bdev call for an obscure ioctl remains for now, but that one will also be deal with in a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Message-Id: <20230811100828.1897174-14-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index f72a1112a31b..9b2188e08bcc 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1359,7 +1359,7 @@ int get_tree_bdev(struct fs_context *fc,
/*
* We drop s_umount here because we need to open the bdev and
* bdev->open_mutex ranks above s_umount (blkdev_put() ->
- * __invalidate_device()). It is safe because we have active sb
+ * bdev_mark_dead()). It is safe because we have active sb
* reference and SB_BORN is not set yet.
*/
up_write(&s->s_umount);
@@ -1411,7 +1411,7 @@ struct dentry *mount_bdev(struct file_system_type *fs_type,
/*
* We drop s_umount here because we need to open the bdev and
* bdev->open_mutex ranks above s_umount (blkdev_put() ->
- * __invalidate_device()). It is safe because we have active sb
+ * bdev_mark_dead()). It is safe because we have active sb
* reference and SB_BORN is not set yet.
*/
up_write(&s->s_umount);