From: wang di Date: Tue, 7 Apr 2015 18:01:06 +0000 (-0700) Subject: LU-6320 lod: Use target index as the master index X-Git-Tag: 2.7.53~50 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=85a1282e287638049d6351974c12e9928aa51c62;p=fs%2Flustre-release.git LU-6320 lod: Use target index as the master index 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 Change-Id: I4a700580dd7a035b243d2314231e50e12742100e Reviewed-on: http://review.whamcloud.com/13941 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond --- diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 7e84a61..f8d3a00 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -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)