static int out_attr_set(struct tgt_session_info *tsi) { struct tgt_thread_info *tti = tgt_th_info(tsi->tsi_env); struct object_update *update = tti->tti_u.update.tti_update; struct lu_attr *attr = &tti->tti_attr; struct dt_object *obj = tti->tti_u.update.tti_dt_object; struct obdo *lobdo = &tti->tti_u.update.tti_obdo; struct obdo *wobdo; size_t size; int rc; ENTRY; wobdo = object_update_param_get(update, 0, &size); if (IS_ERR(wobdo) || size != sizeof(*wobdo)) { CERROR("%s: empty obdo in the update: rc = %ld\n", tgt_name(tsi->tsi_tgt), PTR_ERR(wobdo)); RETURN(PTR_ERR(wobdo)); } attr->la_valid = 0; attr->la_valid = 0; if (ptlrpc_req_need_swab(tsi->tsi_pill->rc_req)) lustre_swab_obdo(wobdo); lustre_get_wire_obdo(NULL, lobdo, wobdo); la_from_obdo(attr, lobdo, lobdo->o_valid); rc = out_tx_attr_set(tsi->tsi_env, obj, attr, &tti->tti_tea, tti->tti_tea.ta_handle, tti->tti_u.update.tti_update_reply, tti->tti_u.update.tti_update_reply_index); RETURN(rc); }
static int out_attr_set(struct tgt_session_info *tsi) { struct tgt_thread_info *tti = tgt_th_info(tsi->tsi_env); struct update *update = tti->tti_u.update.tti_update; struct lu_attr *attr = &tti->tti_attr; struct dt_object *obj = tti->tti_u.update.tti_dt_object; struct obdo *lobdo = &tti->tti_u.update.tti_obdo; struct obdo *wobdo; int size; int rc; ENTRY; wobdo = update_param_buf(update, 0, &size); if (wobdo == NULL || size != sizeof(*wobdo)) { CERROR("%s: empty obdo in the update: rc = %d\n", tgt_name(tsi->tsi_tgt), -EPROTO); RETURN(err_serious(-EPROTO)); } attr->la_valid = 0; attr->la_valid = 0; obdo_le_to_cpu(wobdo, wobdo); lustre_get_wire_obdo(NULL, lobdo, wobdo); la_from_obdo(attr, lobdo, lobdo->o_valid); rc = out_tx_attr_set(tsi->tsi_env, obj, attr, &tti->tti_tea, tti->tti_u.update.tti_update_reply, tti->tti_u.update.tti_update_reply_index); RETURN(rc); }
static int out_attr_set(struct mdt_thread_info *info) { struct update *update = info->mti_u.update.mti_update; struct lu_attr *attr = &info->mti_attr.ma_attr; struct dt_object *obj = info->mti_u.update.mti_dt_object; struct obdo *lobdo = &info->mti_u.update.mti_obdo; struct obdo *wobdo; int size; int rc; ENTRY; wobdo = update_param_buf(update, 0, &size); if (wobdo == NULL || size != sizeof(*wobdo)) { CERROR("%s: empty obdo in the update: rc = %d\n", mdt_obd_name(info->mti_mdt), -EPROTO); RETURN(err_serious(-EPROTO)); } attr->la_valid = 0; attr->la_valid = 0; obdo_le_to_cpu(wobdo, wobdo); lustre_get_wire_obdo(lobdo, wobdo); la_from_obdo(attr, lobdo, lobdo->o_valid); rc = out_tx_attr_set(info, obj, attr, &info->mti_handle, info->mti_u.update.mti_update_reply, info->mti_u.update.mti_update_reply_index); RETURN(rc); }