Whamcloud - gitweb
LU-15572 util: mirror delete with old MDS 14/46614/5
authorBobi Jam <bobijam@whamcloud.com>
Fri, 25 Feb 2022 08:34:07 +0000 (16:34 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 5 Mar 2022 20:42:30 +0000 (20:42 +0000)
old MDS does not support mirror delete without volatile file and
clobbers the intent close error as -EBUSY, this patch catch the
ambiguous error and try the mirror delete using old way.

Fixes: b2d73351e6 ("LU-14521 flr: delete mirror without volatile file")
Test-Parameters: trivial
Test-Parameters: serverversion=2.14.0 testlist=sanity env=ONLY="0 50 60 61 203"
Test-Parameters: clientversion=2.14.0 testlist=sanity env=ONLY="0 50 60 61 203"
Test-Parameters: serverversion=2.12.8 testlist=sanity env=ONLY="0 50 60 61 203" serverdistro=el7.9
Test-Parameters: clientversion=2.12.8 testlist=sanity env=ONLY="0 50 60 61 203"
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I497118cbb7da871268f0fdd6bdb88ad6bd831a26
Reviewed-on: https://review.whamcloud.com/46614
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>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/lfs.c

index 3a1511f..94d2696 100644 (file)
@@ -2329,7 +2329,7 @@ again:
        data->lil_ids[1] = mirror_id;
        rc = llapi_lease_set(fd, data);
        if (rc <= 0) {
-               if (rc == -EINVAL && purge) {
+               if ((rc == -EINVAL || rc == -EBUSY) && purge) {
                        /* could be old MDS which prohibit fd==fdv */
                        purge = false;
                        goto again;