diff mbox series

xfs_io: fix bmap command not detecting realtime files with xattrs

Message ID Y+RcuAFlqnxNBw5I@magnolia (mailing list archive)
State Superseded
Headers show
Series xfs_io: fix bmap command not detecting realtime files with xattrs | expand

Commit Message

Darrick J. Wong Feb. 9, 2023, 2:38 a.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>
---
 io/bmap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christoph Hellwig Feb. 14, 2023, 8:17 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Carlos Maiolino Feb. 22, 2023, 8:28 a.m. UTC | #2
On Wed, Feb 08, 2023 at 06:38:48PM -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>

Looks good to me.

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 a78e0c65440..11bbc0629cf 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 a78e0c65440..11bbc0629cf 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.