From: Darrick J. Wong Date: Tue, 17 Mar 2026 16:51:25 +0000 (-0700) Subject: xfs_scrub: fix i18n of the decode_special_owner return value X-Git-Tag: v7.0.0~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b2a12740b1150cc334f2c5f2849d740c90ef53a3;p=xfsprogs-dev.git xfs_scrub: fix i18n of the decode_special_owner return value The function decode_special_owner turns a special fsmap owner into a printable string value. However, it does not query the gettext catalog for a local language translation, which leads to annoying multilanguage failure messages. Fix that by adding the appropriate wrappers. Cc: # v4.15.0 Fixes: b364a9c008fc04 ("xfs_scrub: scrub file data blocks") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/scrub/phase6.c b/scrub/phase6.c index 590e5d23..41b41aab 100644 --- a/scrub/phase6.c +++ b/scrub/phase6.c @@ -123,16 +123,16 @@ struct owner_decode { }; static const struct owner_decode special_owners[] = { - {XFS_FMR_OWN_FREE, "free space"}, - {XFS_FMR_OWN_UNKNOWN, "unknown owner"}, - {XFS_FMR_OWN_FS, "static FS metadata"}, - {XFS_FMR_OWN_LOG, "journalling log"}, - {XFS_FMR_OWN_AG, "per-AG metadata"}, - {XFS_FMR_OWN_INOBT, "inode btree blocks"}, - {XFS_FMR_OWN_INODES, "inodes"}, - {XFS_FMR_OWN_REFC, "refcount btree"}, - {XFS_FMR_OWN_COW, "CoW staging"}, - {XFS_FMR_OWN_DEFECTIVE, "bad blocks"}, + {XFS_FMR_OWN_FREE, N_("free space")}, + {XFS_FMR_OWN_UNKNOWN, N_("unknown owner")}, + {XFS_FMR_OWN_FS, N_("static FS metadata")}, + {XFS_FMR_OWN_LOG, N_("journalling log")}, + {XFS_FMR_OWN_AG, N_("per-AG metadata")}, + {XFS_FMR_OWN_INOBT, N_("inode btree blocks")}, + {XFS_FMR_OWN_INODES, N_("inodes")}, + {XFS_FMR_OWN_REFC, N_("refcount btree")}, + {XFS_FMR_OWN_COW, N_("CoW staging")}, + {XFS_FMR_OWN_DEFECTIVE, N_("bad blocks")}, {0, NULL}, }; @@ -145,7 +145,7 @@ decode_special_owner( while (od->descr) { if (od->owner == owner) - return od->descr; + return _(od->descr); od++; }