* GPL HEADER END
*/
/*
- * Copyright (c) 2013, 2015, Intel Corporation.
+ * Copyright (c) 2013, 2016, Intel Corporation.
*
* lustre/target/out_handler.c
*
#include <obd_class.h>
#include "tgt_internal.h"
+static inline void orr_cpu_to_le(struct out_read_reply *orr_dst,
+ const struct out_read_reply *orr_src)
+{
+ orr_dst->orr_size = cpu_to_le32(orr_src->orr_size);
+ orr_dst->orr_padding = cpu_to_le32(orr_src->orr_padding);
+ orr_dst->orr_offset = cpu_to_le64(orr_dst->orr_offset);
+}
+
static void out_reconstruct(const struct lu_env *env, struct dt_device *dt,
struct dt_object *obj,
struct object_update_reply *reply,
lustre_msg_set_transno(req->rq_repmsg, req->rq_transno);
lustre_msg_set_status(req->rq_repmsg, req->rq_status);
- DEBUG_REQ(D_RPCTRACE, req, "restoring transno "LPD64"status %d",
- req->rq_transno, req->rq_status);
+ DEBUG_REQ(D_RPCTRACE, req, "restoring resent RPC");
reconstruct(env, dt, obj, reply, index);
return 1;
}
- DEBUG_REQ(D_HA, req, "no reply for RESENT req (have "LPD64")",
+ DEBUG_REQ(D_HA, req, "no reply for RESENT req (have %lld)",
req->rq_export->exp_target_data.ted_lcd->lcd_last_xid);
return 0;
}
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;
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));