X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Ftarget%2Fout_handler.c;h=d9ba4dc57ab264e95ec8482b468b44eee4eb9f5b;hp=2a3f61022fccfe91094be91e7d9a528c70ad8192;hb=a41c6fad4672a60166088b9ad8aeb4f1b51c38e7;hpb=fdda2ad13bf014ec7e492bda3b8276dfd85fcd6d diff --git a/lustre/target/out_handler.c b/lustre/target/out_handler.c index 2a3f610..d9ba4dc 100644 --- a/lustre/target/out_handler.c +++ b/lustre/target/out_handler.c @@ -1057,7 +1057,7 @@ int out_handle(struct tgt_session_info *tsi) reply->ourp_count = updates; tti->tti_u.update.tti_update_reply = reply; tti->tti_mult_trans = !req_is_replay(tgt_ses_req(tsi)); - + /* Walk through updates in the request to execute them */ for (i = 0; i < update_buf_count; i++) { struct tgt_handler *h; @@ -1069,9 +1069,16 @@ int out_handle(struct tgt_session_info *tsi) our = update_bufs[i]; update_count = our->ourq_count; for (j = 0; j < update_count; j++) { + struct lu_object_conf conf; + update = object_update_request_get(our, j, NULL); + if (update->ou_type == OUT_CREATE) + conf.loc_flags = LOC_F_NEW; + else + conf.loc_flags = 0; - dt_obj = dt_locate(env, dt, &update->ou_fid); + dt_obj = dt_locate_at(env, dt, &update->ou_fid, + dt->dd_lu_dev.ld_site->ls_top_dev, &conf); if (IS_ERR(dt_obj)) GOTO(out, rc = PTR_ERR(dt_obj));