X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_device.c;h=f4462b7471dce51476496c1a8e07c796cc24bd33;hb=673b09fb36a85a5f2a263d8953c4a3aff89faf20;hp=6c7256609ca6f39d8594f4ab099ab9e7936b9873;hpb=27815a0611a2e315a9a7696a20c2f257d48aeb7e;p=fs%2Flustre-release.git diff --git a/lustre/mdd/mdd_device.c b/lustre/mdd/mdd_device.c index 6c72566..f4462b7 100644 --- a/lustre/mdd/mdd_device.c +++ b/lustre/mdd/mdd_device.c @@ -920,8 +920,8 @@ static int mdd_prepare(const struct lu_env *env, if (rc < 0) GOTO(out_los, rc); + lu_root_fid(&fid); if (mdd_seq_site(mdd)->ss_node_id == 0) { - lu_root_fid(&fid); rc = mdd_local_file_create(env, mdd, &mdd->mdd_local_root_fid, mdd_root_dir_name, S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO, &fid); @@ -930,8 +930,8 @@ static int mdd_prepare(const struct lu_env *env, mdd2obd_dev(mdd)->obd_name, rc); GOTO(out_los, rc); } - mdd->mdd_root_fid = fid; + mdd->mdd_root_fid = fid; rc = mdd_dot_lustre_setup(env, mdd); if (rc != 0) { CERROR("%s: initializing .lustre failed: rc = %d\n", @@ -943,6 +943,10 @@ static int mdd_prepare(const struct lu_env *env, if (rc) GOTO(out_los, rc); + } else { + /* Normal client usually send root access to MDT0 directly, + * the root FID on non-MDT0 will only be used by echo client. */ + mdd->mdd_root_fid = fid; } rc = orph_index_init(env, mdd);