X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftarget%2Ftgt_internal.h;h=7c96074c2c9b44e21bbae521b48f94353e825526;hb=0b715b9a53354ace21fd8574b999b53765522176;hp=7241a3e49cf9b1684c24e00c7f4c9b870385d255;hpb=ccadcfd3940040465a59a13367f0d79a823625bd;p=fs%2Flustre-release.git diff --git a/lustre/target/tgt_internal.h b/lustre/target/tgt_internal.h index 7241a3e..7c96074 100644 --- a/lustre/target/tgt_internal.h +++ b/lustre/target/tgt_internal.h @@ -45,7 +45,8 @@ extern int (*tgt_lfsck_in_notify)(const struct lu_env *env, struct dt_device *key, - struct lfsck_request *lr); + struct lfsck_request *lr, + struct thandle *th); struct tx_arg; typedef int (*tx_exec_func_t)(const struct lu_env *env, struct thandle *th, @@ -55,13 +56,13 @@ struct tx_arg { tx_exec_func_t exec_fn; tx_exec_func_t undo_fn; struct dt_object *object; - char *file; - struct update_reply *reply; + const char *file; + struct object_update_reply *reply; int line; int index; union { struct { - const struct dt_rec *rec; + struct dt_insert_rec rec; const struct dt_key *key; } insert; struct { @@ -91,13 +92,11 @@ struct tx_arg { } u; }; -#define TX_MAX_OPS 10 struct thandle_exec_args { struct thandle *ta_handle; - struct dt_device *ta_dev; - struct tx_arg ta_args[TX_MAX_OPS]; - int ta_err; - int ta_argno; /* used args */ + int ta_argno; /* used args */ + int ta_alloc_args; /* allocated args count */ + struct tx_arg **ta_args; }; /** @@ -129,15 +128,16 @@ struct tgt_thread_info { struct l_wait_info tti_wait_info; } rdpg; struct { - struct dt_object_format tti_update_dof; - struct update_reply *tti_update_reply; - struct update *tti_update; - int tti_update_reply_index; - struct obdo tti_obdo; - struct dt_object *tti_dt_object; + struct dt_object_format tti_update_dof; + struct object_update_reply *tti_update_reply; + struct object_update *tti_update; + int tti_update_reply_index; + struct obdo tti_obdo; + struct dt_object *tti_dt_object; } update; } tti_u; struct lfsck_request tti_lr; + struct dt_insert_rec tti_rec; }; extern struct lu_context_key tgt_thread_key; @@ -185,23 +185,30 @@ int out_handle(struct tgt_session_info *tsi); __out_tx_xattr_set(info, obj, buf, name, fl, th, reply, idx, \ __FILE__, __LINE__) +#define out_tx_xattr_del(info, obj, name, th, reply, idx) \ + __out_tx_xattr_del(info, obj, name, th, reply, idx, \ + __FILE__, __LINE__) + #define out_tx_ref_add(info, obj, th, reply, idx) \ __out_tx_ref_add(info, obj, th, reply, idx, __FILE__, __LINE__) #define out_tx_ref_del(info, obj, th, reply, idx) \ __out_tx_ref_del(info, obj, th, reply, idx, __FILE__, __LINE__) -#define out_tx_index_insert(info, obj, th, name, fid, reply, idx) \ - __out_tx_index_insert(info, obj, th, name, fid, reply, idx, \ +#define out_tx_index_insert(info, obj, rec, key, th, reply, idx) \ + __out_tx_index_insert(info, obj, rec, key, th, reply, idx, \ __FILE__, __LINE__) -#define out_tx_index_delete(info, obj, th, name, reply, idx) \ - __out_tx_index_delete(info, obj, th, name, reply, idx, \ +#define out_tx_index_delete(info, obj, key, th, reply, idx) \ + __out_tx_index_delete(info, obj, key, th, reply, idx, \ __FILE__, __LINE__) #define out_tx_destroy(info, obj, th, reply, idx) \ __out_tx_destroy(info, obj, th, reply, idx, __FILE__, __LINE__) +#define out_tx_write(info, obj, buf, pos, th, reply, idx) \ + __out_tx_write(info, obj, buf, pos, th, reply, idx, __FILE__, __LINE__) + extern struct page *tgt_page_to_corrupt; struct tgt_thread_big_cache {