struct lu_device *mdt_qmt_dev;
struct coordinator mdt_coordinator;
+
+ /* inter-MDT connection count */
+ atomic_t mdt_mds_mds_conns;
+
+ /* MDT device async commit count, used for debug and sanity test */
+ atomic_t mdt_async_commit_count;
};
#define MDT_SERVICE_WATCHDOG_FACTOR (2)
/* Ops object filename */
struct lu_name mti_name;
- /* per-thread values, can be re-used */
+ /* per-thread values, can be re-used, may be vmalloc'd */
void *mti_big_lmm;
int mti_big_lmmsize;
/* big_lmm buffer was used and must be used in reply */
int mdt_object_lock(struct mdt_thread_info *info, struct mdt_object *mo,
struct mdt_lock_handle *lh, __u64 ibits);
+int mdt_reint_object_lock(struct mdt_thread_info *info, struct mdt_object *o,
+ struct mdt_lock_handle *lh, __u64 ibits,
+ 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);
+
void mdt_object_unlock(struct mdt_thread_info *info, struct mdt_object *mo,
struct mdt_lock_handle *lh, int decref);
int mdt_agent_record_update(const struct lu_env *env,
struct mdt_device *mdt, __u64 *cookies,
int cookies_count, enum agent_req_status status);
-int mdt_agent_llog_update_rec(const struct lu_env *env, struct mdt_device *mdt,
- struct llog_handle *llh,
- struct llog_agent_req_rec *larr);
/* mdt/mdt_hsm_cdt_agent.c */
extern const struct file_operations mdt_hsm_agent_fops;
/* mdt/mdt_coordinator.c */
void mdt_hsm_dump_hal(int level, const char *prefix,
struct hsm_action_list *hal);
+struct cdt_restore_handle *mdt_hsm_restore_hdl_find(struct coordinator *cdt,
+ const struct lu_fid *fid);
/* coordinator management */
int mdt_hsm_cdt_init(struct mdt_device *mdt);
int mdt_hsm_cdt_start(struct mdt_device *mdt);
int mdt_hsm_cdt_wakeup(struct mdt_device *mdt);
/* coordinator control /proc interface */
-ssize_t mdt_hsm_cdt_control_seq_write(struct file *file, const char *buffer,
- size_t count, loff_t *off);
+ssize_t mdt_hsm_cdt_control_seq_write(struct file *file,
+ const char __user *buffer,
+ size_t count, loff_t *off);
int mdt_hsm_cdt_control_seq_show(struct seq_file *m, void *data);
int hsm_cdt_procfs_init(struct mdt_device *mdt);
void hsm_cdt_procfs_fini(struct mdt_device *mdt);
static inline int mdt_fail_write(const struct lu_env *env,
struct dt_device *dd, int id)
{
- if (OBD_FAIL_CHECK_ORSET(id, OBD_FAIL_ONCE)) {
- CERROR(LUSTRE_MDT_NAME": cfs_fail_loc=%x, fail write ops\n",
- id);
- return dd->dd_ops->dt_ro(env, dd);
- /* We set FAIL_ONCE because we never "un-fail" a device */
- }
-
- return 0;
+ if (OBD_FAIL_CHECK_ORSET(id, OBD_FAIL_ONCE)) {
+ CERROR(LUSTRE_MDT_NAME": cfs_fail_loc=%x, fail write ops\n",
+ id);
+ return dt_ro(env, dd);
+ /* We set FAIL_ONCE because we never "un-fail" a device */
+ }
+
+ return 0;
}
static inline struct mdt_export_data *mdt_req2med(struct ptlrpc_request *req)
ldlm_lock_decref(lh, mode);
}
+static inline bool mdt_slc_is_enabled(struct mdt_device *mdt)
+{
+ return mdt->mdt_lut.lut_sync_lock_cancel == BLOCKING_SYNC_ON_CANCEL;
+}
+
extern mdl_mode_t mdt_mdl_lock_modes[];
extern enum ldlm_mode mdt_dlm_lock_modes[];