diff mbox series

[32/43] xfs: allow COW forks on zoned file systems in xchk_bmap

Message ID 20241211085636.1380516-33-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/43] xfs: constify feature checks | expand

Commit Message

Christoph Hellwig Dec. 11, 2024, 8:54 a.m. UTC
zoned file systems can have COW forks even without reflinks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/scrub/bmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Dec. 13, 2024, 10:47 p.m. UTC | #1
On Wed, Dec 11, 2024 at 09:54:57AM +0100, Christoph Hellwig wrote:
> zoned file systems can have COW forks even without reflinks.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  fs/xfs/scrub/bmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
> index 66da7d4d56ba..cfc6f035ecaa 100644
> --- a/fs/xfs/scrub/bmap.c
> +++ b/fs/xfs/scrub/bmap.c
> @@ -1039,7 +1039,7 @@ xchk_bmap(
>  	switch (whichfork) {
>  	case XFS_COW_FORK:
>  		/* No CoW forks on non-reflink filesystems. */
> -		if (!xfs_has_reflink(mp)) {
> +		if (!xfs_has_reflink(mp) && !xfs_has_zoned(mp)) {

Might want to update the comment

/* No CoW forks filesystem doesn't support out of place writes */

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

--D

>  			xchk_ino_set_corrupt(sc, sc->ip->i_ino);
>  			return 0;
>  		}
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index 66da7d4d56ba..cfc6f035ecaa 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -1039,7 +1039,7 @@  xchk_bmap(
 	switch (whichfork) {
 	case XFS_COW_FORK:
 		/* No CoW forks on non-reflink filesystems. */
-		if (!xfs_has_reflink(mp)) {
+		if (!xfs_has_reflink(mp) && !xfs_has_zoned(mp)) {
 			xchk_ino_set_corrupt(sc, sc->ip->i_ino);
 			return 0;
 		}