From 79f8a4a38c71c7f06ac561ca4cd6d6b9cb5aa4fb Mon Sep 17 00:00:00 2001 From: Bobi Jam Date: Fri, 25 Feb 2022 16:34:07 +0800 Subject: [PATCH] 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 --- lustre/utils/lfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 1.8.3.1