struct obd_export *mdt_bottom_exp;
/** target device */
struct lu_target mdt_lut;
- /*
- * Options bit-fields.
- */
- struct {
- signed int mo_user_xattr :1,
- mo_acl :1,
- mo_compat_resname:1,
- mo_mds_capa :1,
- mo_oss_capa :1,
- mo_cos :1;
- } mdt_opts;
+ /*
+ * Options bit-fields.
+ */
+ struct {
+ unsigned int mo_user_xattr:1,
+ mo_acl:1,
+ mo_compat_resname:1,
+ mo_mds_capa:1,
+ mo_oss_capa:1,
+ mo_cos:1;
+ } mdt_opts;
/* mdt state flags */
unsigned long mdt_state;
/* lock to protect IOepoch */
struct lustre_handle mlh_pdo_lh;
ldlm_mode_t mlh_pdo_mode;
unsigned int mlh_pdo_hash;
+
+ /* Remote regular lock */
+ struct lustre_handle mlh_rreg_lh;
+ ldlm_mode_t mlh_rreg_mode;
};
enum {
struct lu_buf buf;
loff_t pos;
} write;
+ struct {
+ struct ost_body *body;
+ } destroy;
} u;
};
return lu_object_exists(&o->mot_obj.mo_lu);
}
+static inline int mdt_object_remote(const struct mdt_object *o)
+{
+ return lu_object_remote(&o->mot_obj.mo_lu);
+}
+
static inline const struct lu_fid *mdt_object_fid(const struct mdt_object *o)
{
return lu_object_fid(&o->mot_obj.mo_lu);
class_export_put(exp);
}
+/* Here we use LVB_TYPE to check dne client, because it is
+ * also landed on 2.4. */
+static inline int mdt_is_dne_client(struct obd_export *exp)
+{
+ return !!(exp_connect_flags(exp) & OBD_CONNECT_LVB_TYPE);
+}
+
int mdt_get_disposition(struct ldlm_reply *rep, int flag);
void mdt_set_disposition(struct mdt_thread_info *info,
struct ldlm_reply *rep, int flag);
void mdt_client_compatibility(struct mdt_thread_info *info);
+int mdt_remote_object_lock(struct mdt_thread_info *mti,
+ struct mdt_object *o, struct lustre_handle *lh,
+ ldlm_mode_t mode, __u64 ibits);
int mdt_close_unpack(struct mdt_thread_info *info);
int mdt_reint_unpack(struct mdt_thread_info *info, __u32 op);
int mdt_reint_rec(struct mdt_thread_info *, struct mdt_lock_handle *);
int mdt_quotacheck(struct mdt_thread_info *info);
int mdt_quotactl(struct mdt_thread_info *info);
int mdt_quota_dqacq(struct mdt_thread_info *info);
+int mdt_swap_layouts(struct mdt_thread_info *info);
extern struct lprocfs_vars lprocfs_mds_module_vars[];
extern struct lprocfs_vars lprocfs_mds_obd_vars[];
void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars);
void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars);
int mdt_procfs_init(struct mdt_device *mdt, const char *name);
-int mdt_procfs_fini(struct mdt_device *mdt);
+void mdt_procfs_fini(struct mdt_device *mdt);
void mdt_rename_counter_tally(struct mdt_thread_info *info,
struct mdt_device *mdt,
struct ptlrpc_request *req,