Whamcloud - gitweb
LU-17897 lfsck: don't assert on orphan existence 02/55302/2
authorLai Siyao <lai.siyao@whamcloud.com>
Fri, 17 May 2024 09:40:23 +0000 (05:40 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 01:14:13 +0000 (01:14 +0000)
lfsck_namespace_create_orphan_dir() is called in several cases,
and orphan may exist in some cases, change assertion to check.

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I28563aa60d0f345616fd30cd0899495e7c1ef8f0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55302
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lfsck/lfsck_namespace.c

index 5a4fabd..8d5350f 100644 (file)
@@ -1465,7 +1465,8 @@ static int lfsck_namespace_create_orphan_dir(const struct lu_env *env,
        int rc1 = 0;
 
        ENTRY;
-       LASSERT(!dt_object_exists(orphan));
+       if (dt_object_exists(orphan))
+               RETURN(0);
 
        cname->ln_name = NULL;
        if (lfsck->li_bookmark_ram.lb_param & LPF_DRYRUN)