X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Ftarget%2Ftgt_internal.h;h=39fb4101e6f2c200e86b3131f021d88d534139a5;hb=23773b32bfe15fccc9c029d722dc1bd5b0144779;hp=c378d853c54ed6d7fa31357077b3e922ba57e03e;hpb=d10200a80770f0029d1d665af954187b9ad883df;p=fs%2Flustre-release.git diff --git a/lustre/target/tgt_internal.h b/lustre/target/tgt_internal.h index c378d85..39fb410 100644 --- a/lustre/target/tgt_internal.h +++ b/lustre/target/tgt_internal.h @@ -21,7 +21,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2012, 2016, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. */ /* * lustre/target/tgt_internal.h @@ -35,7 +35,6 @@ #define _TG_INTERNAL_H #include -#include #include #include #include @@ -43,10 +42,10 @@ #include #include -extern int (*tgt_lfsck_in_notify)(const struct lu_env *env, - struct dt_device *key, - struct lfsck_request *lr, - struct thandle *th); +extern int (*tgt_lfsck_in_notify_local)(const struct lu_env *env, + struct dt_device *key, + struct lfsck_req_local *lrl, + struct thandle *th); /** * Common data shared by tg-level handlers. This is allocated per-thread to * reduce stack consumption. @@ -73,8 +72,6 @@ struct tgt_thread_info { struct { /* for tgt_readpage() */ struct lu_rdpg tti_rdpg; - /* for tgt_sendpage() */ - struct l_wait_info tti_wait_info; } rdpg; struct { struct dt_object_format tti_update_dof; @@ -83,10 +80,10 @@ struct tgt_thread_info { int tti_update_reply_index; struct obdo tti_obdo; struct dt_object *tti_dt_object; - struct l_wait_info tti_wait_info; } update; + struct obd_statfs osfs; /* for obd_statfs() in OFD/MDT */ } tti_u; - struct lfsck_request tti_lr; + struct lfsck_req_local tti_lrl; struct dt_insert_rec tti_rec; }; @@ -244,7 +241,7 @@ int tgt_txn_start_cb(const struct lu_env *env, struct thandle *th, int tgt_txn_stop_cb(const struct lu_env *env, struct thandle *th, void *cookie); int tgt_handle_received_xid(struct obd_export *exp, __u64 rcvd_xid); -int tgt_handle_tag(struct obd_export *exp, __u16 tag); +int tgt_handle_tag(struct ptlrpc_request *req); void update_records_dump(const struct update_records *records, unsigned int mask, bool dump_updates); @@ -285,4 +282,21 @@ int top_trans_create_tmt(const struct lu_env *env, struct top_thandle *top_th); void tgt_cancel_slc_locks(struct lu_target *tgt, __u64 transno); +void barrier_init(void); +void barrier_fini(void); + +/* FMD tracking data */ +struct tgt_fmd_data { + struct list_head fmd_list; /* linked to tgt_fmd_list */ + struct lu_fid fmd_fid; /* FID being written to */ + __u64 fmd_mactime_xid; /* xid highest {m,a,c}time setattr */ + time64_t fmd_expire; /* time when the fmd should expire */ + int fmd_refcount; /* reference counter - list holds 1 */ +}; + +/* tgt_fmd.c */ +extern struct kmem_cache *tgt_fmd_kmem; +void tgt_fmd_expire(struct obd_export *exp); +void tgt_fmd_cleanup(struct obd_export *exp); + #endif /* _TG_INTERNAL_H */