From 18f7a2e9ff3536a6d7cefebb9e9a58ffbf460627 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 11 Apr 2025 12:39:27 -0700 Subject: [PATCH] LU-18886 zfs-osd: za_name flexible array OI scrub fix Initialize the zap_attribute_t.za_name_len to resolve the OI scrub failures observed with zfs-2.3. This is a follow up to commit d47a71f7a894a193957fe7771d43c5767979c117 which made an identical fix for the other sites where a zap_attribute_t is used. Test-Parameters: fstype=zfs Fixes: d47a71f7a894a ("LU-18360 zfs-osd: za_name flexible array") Signed-off-by: Brian Behlendorf Change-Id: Ib4295cbb7ce7e7efe0f7e67b82bc8c73a1f9df8d Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58762 Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Reviewed-by: Shaun Tancheff Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Tested-by: jenkins Tested-by: Maloo --- lustre/osd-zfs/osd_scrub.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lustre/osd-zfs/osd_scrub.c b/lustre/osd-zfs/osd_scrub.c index 3b4acdd..4c7bb09 100644 --- a/lustre/osd-zfs/osd_scrub.c +++ b/lustre/osd-zfs/osd_scrub.c @@ -1873,6 +1873,11 @@ static int osd_scan_dir(const struct lu_env *env, struct osd_device *dev, za = &it->ozi_za; zde = &it->ozi_zde; + +#ifdef ZAP_MAXNAMELEN_NEW + za->za_name_len = MAXNAMELEN; +#endif + while (1) { rc = -zap_cursor_retrieve(it->ozi_zc, za); if (unlikely(rc)) { -- 1.8.3.1