Whamcloud - gitweb
LU-6320 lod: Use target index as the master index 41/13941/4
authorwang di <di.wang@intel.com>
Tue, 7 Apr 2015 18:01:06 +0000 (11:01 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 10 Apr 2015 04:29:24 +0000 (04:29 +0000)
Because lum_stripe_offset might be -1, if it comes
from the default stripe, and also the master stripe
always in the same MDT as the master object, so
it should use master object MDT index as the master
stripe index.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I4a700580dd7a035b243d2314231e50e12742100e
Reviewed-on: http://review.whamcloud.com/13941
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/lod/lod_object.c

index 7e84a61..f8d3a00 100644 (file)
@@ -1813,7 +1813,7 @@ static int lod_prep_md_striped_create(const struct lu_env *env,
                if (i == 0) {
                        /* Right now, master stripe and master object are
                         * on the same MDT */
-                       idx = le32_to_cpu(lum->lum_stripe_offset);
+                       idx = lu_site2seq(lod2lu_dev(lod)->ld_site)->ss_node_id;
                        rc = obd_fid_alloc(env, lod->lod_child_exp, &fid,
                                           NULL);
                        if (rc < 0)