[PATCH 19/26] staging/lustre/mdt: return EXDEV for cross-MDT rename

From: Peng Tao
Date: Thu Nov 14 2013 - 11:47:21 EST


From: wang di <di.wang@xxxxxxxxx>

If target does not exist, and source directory is remote
directory, it should return -EXDEV.

Add test in test_24x to verify it.

Create local directory for test_214, since cross-MDT rename
is not allowed yet.

Lustre-change: http://review.whamcloud.com/7579
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3894
Signed-off-by: wang di <di.wang@xxxxxxxxx>
Reviewed-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
[picked only client side of change -- Peng Tao]
Signed-off-by: Peng Tao <bergwolf@xxxxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
drivers/staging/lustre/lustre/include/lustre_fid.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h
index 84a897e..c33db9e 100644
--- a/drivers/staging/lustre/lustre/include/lustre_fid.h
+++ b/drivers/staging/lustre/lustre/include/lustre_fid.h
@@ -289,6 +289,11 @@ static inline int fid_is_quota(const struct lu_fid *fid)
fid_seq(fid) == FID_SEQ_QUOTA_GLB;
}

+static inline int fid_is_name_llog(const struct lu_fid *fid)
+{
+ return fid_seq(fid) == FID_SEQ_LLOG_NAME;
+}
+
static inline int fid_is_namespace_visible(const struct lu_fid *fid)
{
const __u64 seq = fid_seq(fid);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/