Whamcloud - gitweb
LU-5894 mds: allow 2.4/2.5 clients create remote dir 15/12715/2
authorWang Di <di.wang@intel.com>
Fri, 14 Nov 2014 07:16:09 +0000 (23:16 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 4 Dec 2014 13:31:25 +0000 (13:31 +0000)
MDS will only return ENOTSUPP if old client (2.4/2.5) tries
to create striped dir with stripe count > 1, so it can still
create remote directory on the new MDS (>= 2.6).

Change-Id: I25c90ae793f91eed032949d26fd5e7fc41801e4f
Signed-off-by: Wang Di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/12715
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/mdt/mdt_reint.c

index f751f98..d602111 100644 (file)
@@ -313,8 +313,13 @@ static int mdt_remote_permission(struct mdt_thread_info *info,
                return -ENOTSUPP;
 
        if (S_ISDIR(attr->la_mode) && spec->u.sp_ea.eadata != NULL &&
-           spec->u.sp_ea.eadatalen != 0 && !mdt_is_striped_client(exp))
-               return -ENOTSUPP;
+           spec->u.sp_ea.eadatalen != 0) {
+               const struct lmv_user_md *lum = spec->u.sp_ea.eadata;
+
+               if (le32_to_cpu(lum->lum_stripe_count) > 1 &&
+                   !mdt_is_striped_client(exp))
+                       return -ENOTSUPP;
+       }
 
        return 0;
 }