[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016201353.GR21853@frogsfrogsfrogs>
Date: Wed, 16 Oct 2024 13:13:53 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: John Garry <john.g.garry@...cle.com>
Cc: axboe@...nel.dk, brauner@...nel.org, viro@...iv.linux.org.uk,
jack@...e.cz, dchinner@...hat.com, hch@....de, cem@...nel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
hare@...e.de, martin.petersen@...cle.com,
catherine.hoang@...cle.com, mcgrof@...nel.org,
ritesh.list@...il.com, ojaswin@...ux.ibm.com
Subject: Re: [PATCH v9 8/8] xfs: Support setting FMODE_CAN_ATOMIC_WRITE
On Wed, Oct 16, 2024 at 10:03:25AM +0000, John Garry wrote:
> Set FMODE_CAN_ATOMIC_WRITE flag if we can atomic write for that inode.
>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Signed-off-by: John Garry <john.g.garry@...cle.com>
Woot!
Reviewed-by: Darrick J. Wong <djwong@...nel.org>
--D
> ---
> fs/xfs/xfs_file.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index 1ccbc1eb75c9..ca47cae5a40a 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -1253,6 +1253,8 @@ xfs_file_open(
> if (xfs_is_shutdown(XFS_M(inode->i_sb)))
> return -EIO;
> file->f_mode |= FMODE_NOWAIT | FMODE_CAN_ODIRECT;
> + if (xfs_inode_can_atomicwrite(XFS_I(inode)))
> + file->f_mode |= FMODE_CAN_ATOMIC_WRITE;
> return generic_file_open(inode, file);
> }
>
> --
> 2.31.1
>
>
Powered by blists - more mailing lists