Whamcloud - gitweb
LU-18886 zfs-osd: za_name flexible array OI scrub fix 62/58762/4
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 11 Apr 2025 19:39:27 +0000 (12:39 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 May 2025 02:16:26 +0000 (02:16 +0000)
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 <behlendorf1@llnl.gov>
Change-Id: Ib4295cbb7ce7e7efe0f7e67b82bc8c73a1f9df8d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58762
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-zfs/osd_scrub.c

index 3b4acdd..4c7bb09 100644 (file)
@@ -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)) {