From: Lai Siyao Date: Mon, 15 Jun 2015 08:37:42 +0000 (+0800) Subject: LU-6660 rename: DNE2 should return -EXDEV upon remote rename X-Git-Tag: 2.7.57~34 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=31234e608fa156761b2d8c48ff60cba875dd4832;p=fs%2Flustre-release.git LU-6660 rename: DNE2 should return -EXDEV upon remote rename DNE2 MDS should return -EXDEV upon remote rename, so that old client can do rename with copy and delete, instead of fail with -EREMOTE. Signed-off-by: Lai Siyao Change-Id: I68e8e99259065922f31bee5343be309380715674 Reviewed-on: http://review.whamcloud.com/15323 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: wangdi Reviewed-by: Fan Yong --- diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 0b914d7..01f0d6d 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -2185,7 +2185,7 @@ retry_rename: rc = md_rename(target_exp, op_data, old, oldlen, new, newlen, request); - if (rc != 0 && rc != -EREMOTE) + if (rc != 0 && rc != -EXDEV) RETURN(rc); body = req_capsule_server_get(&(*request)->rq_pill, &RMF_MDT_BODY); diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 71e49f6..647fd69 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -1761,7 +1761,7 @@ static int mdt_reint_rename_internal(struct mdt_thread_info *info, LASSERT(repbody != NULL); repbody->mbo_fid1 = *new_fid; repbody->mbo_valid |= (OBD_MD_FLID | OBD_MD_MDS); - GOTO(out_put_old, rc = -EREMOTE); + GOTO(out_put_old, rc = -EXDEV); } /* Before locking the target dir, check we do not replace * a dir with a non-dir, otherwise it may deadlock with