Whamcloud - gitweb
LU-6660 rename: DNE2 should return -EXDEV upon remote rename 23/15323/4
authorLai Siyao <lai.siyao@intel.com>
Mon, 15 Jun 2015 08:37:42 +0000 (16:37 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 19 Jul 2015 04:00:36 +0000 (04:00 +0000)
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 <lai.siyao@intel.com>
Change-Id: I68e8e99259065922f31bee5343be309380715674
Reviewed-on: http://review.whamcloud.com/15323
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
lustre/lmv/lmv_obd.c
lustre/mdt/mdt_reint.c

index 0b914d7..01f0d6d 100644 (file)
@@ -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);
index 71e49f6..647fd69 100644 (file)
@@ -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