struct lu_env cdt_env; /**< coordinator lustre
* env */
struct lu_context cdt_session; /** session for lu_ucred */
struct lu_env cdt_env; /**< coordinator lustre
* env */
struct lu_context cdt_session; /** session for lu_ucred */
- struct proc_dir_entry *cdt_proc_dir; /**< cdt /proc directory */
+ struct dentry *cdt_debugfs_dir; /**< cdt debugfs directory */
+ struct completion cdt_kobj_unregister;
+ struct kobject cdt_hsm_kobj; /* hsm sysfs object */
__u64 cdt_policy; /**< policy flags */
enum cdt_states cdt_state; /**< state */
struct mutex cdt_state_lock; /**< cdt_state lock */
__u64 cdt_policy; /**< policy flags */
enum cdt_states cdt_state; /**< state */
struct mutex cdt_state_lock; /**< cdt_state lock */
- /*
- * XXX: Part One:
- * The following members will be filled explicitly
- * with specific data in mdt_thread_info_init().
- */
- /* TODO: move this into mdt_session_key(with LCT_SESSION), because
- * request handling may migrate from one server thread to another.
- */
- struct req_capsule *mti_pill;
-
- /* although we have export in req, there are cases when it is not
- * available, e.g. closing files upon export destroy */
- struct obd_export *mti_exp;
- /*
- * A couple of lock handles.
- */
- struct mdt_lock_handle mti_lh[MDT_LH_NR];
-
- struct mdt_device *mti_mdt;
- const struct lu_env *mti_env;
-
- /* transaction number of current request */
- __u64 mti_transno;
-
-
- /*
- * XXX: Part Two:
- * The following members will be filled expilictly
- * with zero in mdt_thread_info_init(). These members may be used
- * by all requests.
- */
-
- /*
- * Object attributes.
- */
+ /*
+ * XXX: Part One:
+ * The following members will be filled explicitly
+ * with specific data in mdt_thread_info_init().
+ */
+ /* TODO: move this into mdt_session_key(with LCT_SESSION), because
+ * request handling may migrate from one server thread to another.
+ */
+ struct req_capsule *mti_pill;
+
+ /* although we have export in req, there are cases when it is not
+ * available, e.g. closing files upon export destroy */
+ struct obd_export *mti_exp;
+ /*
+ * A couple of lock handles.
+ */
+ struct mdt_lock_handle mti_lh[MDT_LH_NR];
+
+ struct mdt_device *mti_mdt;
+ const struct lu_env *mti_env;
+
+ /* transaction number of current request */
+ __u64 mti_transno;
+
+ /*
+ * XXX: Part Two:
+ * The following members will be filled expilictly
+ * with zero in mdt_thread_info_init(). These members may be used
+ * by all requests.
+ */
+
+ /*
+ * Object attributes.
+ */
- /*
- * Body for "habeo corpus" operations.
- */
- const struct mdt_body *mti_body;
- /*
- * Host object. This is released at the end of mdt_handler().
- */
- struct mdt_object *mti_object;
- /*
- * Lock request for "habeo clavis" operations.
- */
- const struct ldlm_request *mti_dlm_req;
-
- __u32 mti_has_trans:1, /* has txn already? */
+ /*
+ * Body for "habeo corpus" operations.
+ */
+ const struct mdt_body *mti_body;
+ /*
+ * Host object. This is released at the end of mdt_handler().
+ */
+ struct mdt_object *mti_object;
+ /*
+ * Lock request for "habeo clavis" operations.
+ */
+ const struct ldlm_request *mti_dlm_req;
+
+ __u32 mti_has_trans:1, /* has txn already? */
- /* opdata for mdt_reint_open(), has the same as
- * ldlm_reply:lock_policy_res1. mdt_update_last_rcvd() stores this
- * value onto disk for recovery when mdt_trans_stop_cb() is called.
- */
- __u64 mti_opdata;
-
- /*
- * XXX: Part Three:
- * The following members will be filled explicitly
- * with zero in mdt_reint_unpack(), because they are only used
- * by reint requests (including mdt_reint_open()).
- */
-
- /*
- * reint record. contains information for reint operations.
- */
- struct mdt_reint_record mti_rr;
-
- __u64 mti_ver[PTLRPC_NUM_VERSIONS];
- /*
- * Operation specification (currently create and lookup)
- */
- struct md_op_spec mti_spec;
-
- /*
- * XXX: Part Four:
- * The following members will _NOT_ be initialized at all.
- * DO NOT expect them to contain any valid value.
- * They should be initialized explicitly by the user themselves.
- */
+ /* opdata for mdt_reint_open(), has the same as
+ * ldlm_reply:lock_policy_res1. mdt_update_last_rcvd() stores this
+ * value onto disk for recovery when mdt_trans_stop_cb() is called.
+ */
+ __u64 mti_opdata;
+
+ /*
+ * XXX: Part Three:
+ * The following members will be filled explicitly
+ * with zero in mdt_reint_unpack(), because they are only used
+ * by reint requests (including mdt_reint_open()).
+ */
+
+ /*
+ * reint record. contains information for reint operations.
+ */
+ struct mdt_reint_record mti_rr;
+
+ __u64 mti_ver[PTLRPC_NUM_VERSIONS];
+ /*
+ * Operation specification (currently create and lookup)
+ */
+ struct md_op_spec mti_spec;
+
+ /*
+ * XXX: Part Four:
+ * The following members will _NOT_ be initialized at all.
+ * DO NOT expect them to contain any valid value.
+ * They should be initialized explicitly by the user themselves.
+ */
/* XXX: If something is in a union, make sure they do not conflict */
struct lu_fid mti_tmp_fid1;
/* XXX: If something is in a union, make sure they do not conflict */
struct lu_fid mti_tmp_fid1;
char ns_name[48];/* for mdt_init0() */
struct lustre_cfg_bufs bufs; /* for mdt_stack_fini() */
struct obd_statfs osfs; /* for mdt_statfs() */
char ns_name[48];/* for mdt_init0() */
struct lustre_cfg_bufs bufs; /* for mdt_stack_fini() */
struct obd_statfs osfs; /* for mdt_statfs() */
- struct {
- /* for mdt_readpage() */
- struct lu_rdpg mti_rdpg;
- /* for mdt_sendpage() */
- struct l_wait_info mti_wait_info;
- } rdpg;
+ struct {
+ /* for mdt_readpage() */
+ struct lu_rdpg mti_rdpg;
+ } rdpg;
char mti_filename[NAME_MAX + 1];
/* per-thread values, can be re-used, may be vmalloc'd */
void *mti_big_lmm;
char mti_filename[NAME_MAX + 1];
/* per-thread values, can be re-used, may be vmalloc'd */
void *mti_big_lmm;
int j;
off = le32_to_cpu(comp_v1->lcm_entries[i].lcme_offset);
v1 = (struct lov_mds_md *)((char *)comp_v1 + off);
int j;
off = le32_to_cpu(comp_v1->lcm_entries[i].lcme_offset);
v1 = (struct lov_mds_md *)((char *)comp_v1 + off);
for (j = 0; j < le16_to_cpu(v1->lmm_stripe_count); j++) {
/* if there is any object on OST */
if (le32_to_cpu(v1->lmm_objects[j].l_ost_idx) !=
for (j = 0; j < le16_to_cpu(v1->lmm_stripe_count); j++) {
/* if there is any object on OST */
if (le32_to_cpu(v1->lmm_objects[j].l_ost_idx) !=
-/* coordinator control /proc interface */
-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);
-struct lprocfs_vars *hsm_cdt_get_proc_vars(void);
+/* coordinator control sysfs interface */
+ssize_t hsm_control_show(struct kobject *kobj, struct attribute *attr,
+ char *buf);
+ssize_t hsm_control_store(struct kobject *kobj, struct attribute *attr,
+ const char *buffer, size_t count);
+int hsm_cdt_tunables_init(struct mdt_device *mdt);
+void hsm_cdt_tunables_fini(struct mdt_device *mdt);
/* md_hsm helpers */
struct mdt_object *mdt_hsm_get_md_hsm(struct mdt_thread_info *mti,
const struct lu_fid *fid,
/* md_hsm helpers */
struct mdt_object *mdt_hsm_get_md_hsm(struct mdt_thread_info *mti,
const struct lu_fid *fid,
void mdt_counter_incr(struct ptlrpc_request *req, int opcode);
void mdt_stats_counter_init(struct lprocfs_stats *stats);
void mdt_counter_incr(struct ptlrpc_request *req, int opcode);
void mdt_stats_counter_init(struct lprocfs_stats *stats);
-int mdt_procfs_init(struct mdt_device *mdt, const char *name);
-void mdt_procfs_fini(struct mdt_device *mdt);
+int mdt_tunables_init(struct mdt_device *mdt, const char *name);
+void mdt_tunables_fini(struct mdt_device *mdt);
/* lustre/mdt_mdt_lproc.c */
int lprocfs_mdt_open_files_seq_open(struct inode *inode,
/* lustre/mdt_mdt_lproc.c */
int lprocfs_mdt_open_files_seq_open(struct inode *inode,