From 85a1282e287638049d6351974c12e9928aa51c62 Mon Sep 17 00:00:00 2001 From: wang di Date: Tue, 7 Apr 2015 11:01:06 -0700 Subject: [PATCH] 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 --- lustre/lod/lod_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 1.8.3.1