mo_mds_capa :1,
mo_oss_capa :1;
} mdt_opts;
-
+ /* mdt state flags */
+ __u32 mdt_fl_cfglog:1,
+ mdt_fl_synced:1;
/* lock to pretect epoch and write count */
spinlock_t mdt_ioepoch_lock;
__u64 mdt_ioepoch;
static inline void mdt_fail_write(const struct lu_env *env,
struct dt_device *dd, int id)
{
- if (OBD_FAIL_CHECK(id)) {
+ if (OBD_FAIL_CHECK_ORSET(id, OBD_FAIL_ONCE)) {
CERROR(LUSTRE_MDT_NAME": obd_fail_loc=%x, fail write ops\n",
id);
dd->dd_ops->dt_ro(env, dd);
/* We set FAIL_ONCE because we never "un-fail" a device */
- obd_fail_loc |= OBD_FAILED | OBD_FAIL_ONCE;
}
}
RETURN(0);
}
-#define MDT_FAIL_CHECK(id) \
-({ \
- if (unlikely(OBD_FAIL_CHECK(id))) \
- CERROR(LUSTRE_MDT_NAME": " #id " test failed\n"); \
- OBD_FAIL_CHECK(id); \
-})
-
-#define MDT_FAIL_CHECK_ONCE(id) \
-({ int _ret_ = 0; \
- if (unlikely(OBD_FAIL_CHECK(id))) { \
- CERROR(LUSTRE_MDT_NAME": *** obd_fail_loc=%x ***\n", id); \
- obd_fail_loc |= OBD_FAILED; \
- if ((id) & OBD_FAIL_ONCE) \
- obd_fail_loc |= OBD_FAIL_ONCE; \
- _ret_ = 1; \
- } \
- _ret_; \
-})
-
-#define MDT_FAIL_RETURN(id, ret) \
-do { \
- if (unlikely(MDT_FAIL_CHECK_ONCE(id))) { \
- RETURN(ret); \
- } \
-} while(0)
-
struct md_ucred *mdt_ucred(const struct mdt_thread_info *info);
static inline int is_identity_get_disabled(struct upcall_cache *cache)
}
/* lprocfs stuff */
+void lprocfs_mdt_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);