* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
unsigned int mo_user_xattr:1,
mo_acl:1,
mo_cos:1,
+ mo_evict_tgt_nids:1,
mo_coordinator:1;
} mdt_opts;
/* mdt state flags */
unsigned int mdt_capa_conf:1,
/* Enable remote dir on non-MDT0 */
- mdt_enable_remote_dir:1;
+ mdt_enable_remote_dir:1,
+ mdt_skip_lfsck:1;
gid_t mdt_enable_remote_dir_gid;
/* statfs optimization: we cache a bit */
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;
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);
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[];