lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240319210136.GI1927156@frogsfrogsfrogs>
Date: Tue, 19 Mar 2024 14:01:36 -0700
From: "Darrick J. Wong" <djwong@...nel.org>
To: Zhang Yi <yi.zhang@...weicloud.com>
Cc: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org, hch@...radead.org, brauner@...nel.org,
	david@...morbit.com, tytso@....edu, jack@...e.cz,
	yi.zhang@...wei.com, chengzhihao1@...wei.com, yukuai3@...wei.com
Subject: Re: [PATCH v3 2/9] xfs: make the seq argument to
 xfs_bmapi_convert_delalloc() optional

On Tue, Mar 19, 2024 at 09:10:55AM +0800, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@...wei.com>
> 
> Allow callers to pass a NULLL seq argument if they don't care about
> the fork sequence number.
> 
> Signed-off-by: Zhang Yi <yi.zhang@...wei.com>
> Reviewed-by: Christoph Hellwig <hch@....de>

Aha, you want this because xfs_bmbt_to_iomap will set the iomap validity
cookie for us, whereas writeback wants to track the per-fork cookie in
the xfs writeback structure.  Ok.

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

--D

> ---
>  fs/xfs/libxfs/xfs_bmap.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index f362345467fa..07dc35de8ce5 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -4574,7 +4574,8 @@ xfs_bmapi_convert_delalloc(
>  	if (!isnullstartblock(bma.got.br_startblock)) {
>  		xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
>  				xfs_iomap_inode_sequence(ip, flags));
> -		*seq = READ_ONCE(ifp->if_seq);
> +		if (seq)
> +			*seq = READ_ONCE(ifp->if_seq);
>  		goto out_trans_cancel;
>  	}
>  
> @@ -4623,7 +4624,8 @@ xfs_bmapi_convert_delalloc(
>  	ASSERT(!isnullstartblock(bma.got.br_startblock));
>  	xfs_bmbt_to_iomap(ip, iomap, &bma.got, 0, flags,
>  				xfs_iomap_inode_sequence(ip, flags));
> -	*seq = READ_ONCE(ifp->if_seq);
> +	if (seq)
> +		*seq = READ_ONCE(ifp->if_seq);
>  
>  	if (whichfork == XFS_COW_FORK)
>  		xfs_refcount_alloc_cow_extent(tp, bma.blkno, bma.length);
> -- 
> 2.39.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ