From: Bobi Jam Date: Fri, 25 Feb 2022 08:34:07 +0000 (+0800) Subject: LU-15572 util: mirror delete with old MDS X-Git-Tag: 2.15.0-RC3~43 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=79f8a4a38c71c7f06ac561ca4cd6d6b9cb5aa4fb;p=fs%2Flustre-release.git LU-15572 util: mirror delete with old MDS 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 Change-Id: I497118cbb7da871268f0fdd6bdb88ad6bd831a26 Reviewed-on: https://review.whamcloud.com/46614 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 3a1511f..94d2696 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -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;