struct coordinator {
wait_queue_head_t cdt_waitq; /**< cdt wait queue */
bool cdt_event; /**< coordinator event */
+ struct task_struct *cdt_task; /**< cdt thread handle */
struct lu_env cdt_env; /**< coordinator lustre
* env */
struct lu_context cdt_session; /** session for lu_ucred */
__u64 cdt_user_request_mask;
__u64 cdt_group_request_mask;
__u64 cdt_other_request_mask;
+
+ /* Remove archive on last unlink policy */
+ bool cdt_remove_archive_on_last_unlink;
};
/* mdt state flag bits */
bool cos_incompat);
int mdt_object_lock_try(struct mdt_thread_info *info, struct mdt_object *mo,
- struct mdt_lock_handle *lh, __u64 ibits);
-
-int mdt_reint_object_lock_try(struct mdt_thread_info *info,
- struct mdt_object *o, struct mdt_lock_handle *lh,
- __u64 ibits, bool cos_incompat);
+ struct mdt_lock_handle *lh, __u64 *ibits,
+ __u64 trybits, bool cos_incompat);
void mdt_object_unlock(struct mdt_thread_info *info, struct mdt_object *mo,
struct mdt_lock_handle *lh, int decref);
int mdt_remote_object_lock(struct mdt_thread_info *mti,
struct mdt_object *o, const struct lu_fid *fid,
struct lustre_handle *lh,
- enum ldlm_mode mode, __u64 ibits, bool nonblock,
- bool cache);
+ enum ldlm_mode mode, __u64 ibits, bool cache);
enum mdt_name_flags {
MNF_FIX_ANON = 1,
struct md_attr *ma);
int mdt_fix_reply(struct mdt_thread_info *info);
int mdt_handle_last_unlink(struct mdt_thread_info *, struct mdt_object *,
- const struct md_attr *);
+ struct md_attr *);
void mdt_reconstruct_open(struct mdt_thread_info *, struct mdt_lock_handle *);
struct lu_buf *mdt_buf(const struct lu_env *env, void *area, ssize_t len);
int mdt_hsm_cdt_init(struct mdt_device *mdt);
int mdt_hsm_cdt_stop(struct mdt_device *mdt);
int mdt_hsm_cdt_fini(struct mdt_device *mdt);
-int mdt_hsm_cdt_wakeup(struct mdt_device *mdt);
+
+/*
+ * Signal the coordinator has work to do
+ * \param cdt [IN] coordinator
+ */
+static inline void mdt_hsm_cdt_event(struct coordinator *cdt)
+{
+ cdt->cdt_event = true;
+}
/* coordinator control /proc interface */
ssize_t mdt_hsm_cdt_control_seq_write(struct file *file,