Whamcloud - gitweb
LU-3336 lfsck: use rbtree to record OST-object accessing
[fs/lustre-release.git] / lustre / target / tgt_internal.h
index bc7809c..7241a3e 100644 (file)
 #include <lustre_req_layout.h>
 #include <lustre_sec.h>
 
+extern int (*tgt_lfsck_in_notify)(const struct lu_env *env,
+                                 struct dt_device *key,
+                                 struct lfsck_request *lr);
+
 struct tx_arg;
 typedef int (*tx_exec_func_t)(const struct lu_env *env, struct thandle *th,
                              struct tx_arg *ta);
@@ -91,8 +95,8 @@ struct tx_arg {
 struct thandle_exec_args {
        struct thandle          *ta_handle;
        struct dt_device        *ta_dev;
-       int                      ta_err;
        struct tx_arg            ta_args[TX_MAX_OPS];
+       int                      ta_err;
        int                      ta_argno;   /* used args */
 };
 
@@ -112,6 +116,8 @@ struct tgt_thread_info {
 
        /* transno storage during last_rcvd update */
        __u64                    tti_transno;
+       __u32                    tti_has_trans:1,
+                                tti_mult_trans:1;
 
        /* Updates data for OUT target */
        struct thandle_exec_args tti_tea;
@@ -131,6 +137,7 @@ struct tgt_thread_info {
                        struct dt_object        *tti_dt_object;
                } update;
        } tti_u;
+       struct lfsck_request tti_lr;
 };
 
 extern struct lu_context_key tgt_thread_key;
@@ -201,4 +208,10 @@ struct tgt_thread_big_cache {
        struct niobuf_local     local[PTLRPC_MAX_BRW_PAGES];
 };
 
+int tgt_server_data_init(const struct lu_env *env, struct lu_target *tgt);
+int tgt_txn_start_cb(const struct lu_env *env, struct thandle *th,
+                    void *cookie);
+int tgt_txn_stop_cb(const struct lu_env *env, struct thandle *th,
+                   void *cookie);
+
 #endif /* _TG_INTERNAL_H */