*/
int tsi_reply_fail_id;
int tsi_request_fail_id;
+
+ __u32 tsi_has_trans:1; /* has txn already? */
};
static inline struct tgt_session_info *tgt_ses_info(const struct lu_env *env)
int tgt_last_rcvd_update(const struct lu_env *env, struct lu_target *tgt,
struct dt_object *obj, __u64 opdata,
struct thandle *th, struct ptlrpc_request *req);
-
enum {
ESERIOUS = 0x0001000
};
mti = lu_context_key_get(&env->le_ctx, &mdt_thread_key);
LASSERT(mti);
- if (mti->mti_has_trans) {
- /* XXX: currently there are allowed cases, but the wrong cases
- * are also possible, so better check is needed here */
- CDEBUG(D_INFO, "More than one transaction "LPU64"\n",
- mti->mti_transno);
- return 0;
- }
-
- mti->mti_has_trans = 1;
if (mti->mti_mos != NULL &&
mdt_object_remote(mti->mti_mos)) {
struct thandle *th, struct ptlrpc_request *req)
{
struct tgt_thread_info *tti = tgt_th_info(env);
+ struct tgt_session_info *tsi = tgt_ses_info(env);
struct tg_export_data *ted;
__u64 *transno_p;
int rc = 0;
ENTRY;
+ if (tsi->tsi_has_trans) {
+ /* XXX: currently there are allowed cases, but the wrong cases
+ * are also possible, so better check is needed here */
+ CDEBUG(D_INFO, "More than one transaction "LPU64"\n",
+ tti->tti_transno);
+ return 0;
+ }
+
+ tsi->tsi_has_trans = 1;
/* that can be OUT target and we need tgt_session_info */
if (req == NULL) {
- struct tgt_session_info *tsi = tgt_ses_info(env);
-
req = tgt_ses_req(tsi);
if (req == NULL) /* echo client case */
RETURN(0);
return rc;
}
EXPORT_SYMBOL(tgt_last_rcvd_update);
+