diff mbox series

[1/2] xfs_io: don't display stripe alignment flags for realtime files

Message ID 167096038305.1739636.16423852960443997377.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs: random fixes for 6.1, part 2 | expand

Commit Message

Darrick J. Wong Dec. 13, 2022, 7:39 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

The stripe unit/width optimizations only occur on the data device, which
means that it makes no sense to report non-stripe-aligned realtime
extents.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 io/fsmap.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/io/fsmap.c b/io/fsmap.c
index 9dd19cc04a9..7db51847e2b 100644
--- a/io/fsmap.c
+++ b/io/fsmap.c
@@ -197,7 +197,7 @@  dump_map_verbose(
 		    p->fmr_flags & FMR_OF_ATTR_FORK ||
 		    p->fmr_flags & FMR_OF_SHARED)
 			flg = 1;
-		if (sunit &&
+		if (sunit && p->fmr_device == xfs_data_dev &&
 		    (p->fmr_physical  % sunit != 0 ||
 		     ((p->fmr_physical + p->fmr_length) % sunit) != 0 ||
 		     p->fmr_physical % swidth != 0 ||
@@ -273,7 +273,7 @@  dump_map_verbose(
 		 * If striping enabled, determine if extent starts/ends
 		 * on a stripe unit boundary.
 		 */
-		if (sunit) {
+		if (sunit && p->fmr_device == xfs_data_dev) {
 			if (p->fmr_physical  % sunit != 0)
 				flg |= FLG_BSU;
 			if (((p->fmr_physical +