diff mbox series

[2/7] bdev: add freeze and thaw holder operations

Message ID 20230927-vfs-super-freeze-v1-2-ecc36d9ab4d9@kernel.org (mailing list archive)
State New, archived
Headers show
Series Implement freeze and thaw as holder operations | expand

Commit Message

Christian Brauner Sept. 27, 2023, 1:21 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.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
 include/linux/blkdev.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Darrick J. Wong Sept. 27, 2023, 2:38 p.m. UTC | #1
On Wed, Sep 27, 2023 at 03:21:15PM +0200, Christian Brauner wrote:
> Add block device freeze and thaw holder operations. Follow-up patches
> will implement block device freeze and thaw based on stuct

s/stuct/struct/

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> blk_holder_ops.
> 
> Signed-off-by: Christian Brauner <brauner@kernel.org>
> ---
>  include/linux/blkdev.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index bf25b63e13d5..f2ddccaaef4d 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;
> 
> -- 
> 2.34.1
>
Christoph Hellwig Oct. 2, 2023, 6:52 a.m. UTC | #2
On Wed, Sep 27, 2023 at 03:21:15PM +0200, Christian Brauner wrote:
> Add block device freeze and thaw holder operations. Follow-up patches
> will implement block device freeze and thaw based on stuct
> blk_holder_ops.

The changes looks good, but having them as a standalone patch is
a bit silly.  I'd merge it into the first patch actually doing
something with the methods.
Jan Kara Oct. 2, 2023, 4:32 p.m. UTC | #3
On Wed 27-09-23 15:21:15, Christian Brauner wrote:
> Add block device freeze and thaw holder operations. Follow-up patches
> will implement block device freeze and thaw based on stuct
> blk_holder_ops.
> 
> Signed-off-by: Christian Brauner <brauner@kernel.org>

Looks good (I don't really care whether you fold this into patch 3 or not).
Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  include/linux/blkdev.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index bf25b63e13d5..f2ddccaaef4d 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;
> 
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index bf25b63e13d5..f2ddccaaef4d 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;