diff mbox series

[v2,04/10] bdev: add freeze and thaw holder operations

Message ID 20231024-vfs-super-freeze-v2-4-599c19f4faac@kernel.org (mailing list archive)
State New, archived
Headers show
Series Implement freeze and thaw as holder operations | expand

Commit Message

Christian Brauner Oct. 24, 2023, 1:01 p.m. UTC
Add block device freeze and thaw holder operations. Follow-up patches
will implement block device freeze and thaw based on stuct
blk_holder_ops.

Link: https://lore.kernel.org/r/20230927-vfs-super-freeze-v1-2-ecc36d9ab4d9@kernel.org
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 include/linux/blkdev.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Christoph Hellwig Oct. 27, 2023, 6:26 a.m. UTC | #1
I still find it weird to add the methods in a separate commit without
the users, but otherwise this still loooks good to me.
diff mbox series

Patch

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 7a3da7f44afb..1bc776335ff8 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1468,6 +1468,16 @@  struct blk_holder_ops {
 	 * Sync the file system mounted on the block device.
 	 */
 	void (*sync)(struct block_device *bdev);
+
+	/*
+	 * Freeze the file system mounted on the block device.
+	 */
+	int (*freeze)(struct block_device *bdev);
+
+	/*
+	 * Thaw the file system mounted on the block device.
+	 */
+	int (*thaw)(struct block_device *bdev);
 };
 
 extern const struct blk_holder_ops fs_holder_ops;