diff mbox series

[4/5] xfs_io: fix bmap command not detecting realtime files with xattrs

Message ID 167658439020.3590000.194008272775624083.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs: random fixes for 6.2 | expand

Commit Message

Darrick J. Wong Feb. 16, 2023, 9:53 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Fix the bmap command so that it will detect a realtime file if any of
the other file flags (e.g. xattrs) are set.  Observed via xfs/556.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
 io/bmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Carlos Maiolino Feb. 22, 2023, 8:48 a.m. UTC | #1
On Thu, Feb 16, 2023 at 01:53:10PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Fix the bmap command so that it will detect a realtime file if any of
> the other file flags (e.g. xattrs) are set.  Observed via xfs/556.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  io/bmap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/io/bmap.c b/io/bmap.c
> index 27383ca6037..722a389baaa 100644
> --- a/io/bmap.c
> +++ b/io/bmap.c
> @@ -118,7 +118,7 @@ bmap_f(
>  			return 0;
>  		}
> 
> -		if (fsx.fsx_xflags == FS_XFLAG_REALTIME) {
> +		if (fsx.fsx_xflags & FS_XFLAG_REALTIME) {
>  			/*
>  			 * ag info not applicable to rt, continue
>  			 * without ag output.
>
diff mbox series

Patch

diff --git a/io/bmap.c b/io/bmap.c
index 27383ca6037..722a389baaa 100644
--- a/io/bmap.c
+++ b/io/bmap.c
@@ -118,7 +118,7 @@  bmap_f(
 			return 0;
 		}
 
-		if (fsx.fsx_xflags == FS_XFLAG_REALTIME) {
+		if (fsx.fsx_xflags & FS_XFLAG_REALTIME) {
 			/*
 			 * ag info not applicable to rt, continue
 			 * without ag output.