#include <lustre_idmap.h>
#include <lustre_eacl.h>
#include <lustre_fsfilt.h>
+#include <lustre_quota.h>
/* check if request's xid is equal to last one or not*/
static inline int req_xid_is_last(struct ptlrpc_request *req)
/* mdt state flags */
unsigned long mdt_state;
/* lock to protect IOepoch */
- cfs_spinlock_t mdt_ioepoch_lock;
+ spinlock_t mdt_ioepoch_lock;
__u64 mdt_ioepoch;
/* transaction callbacks */
struct upcall_cache *mdt_identity_cache;
/* sptlrpc rules */
- cfs_rwlock_t mdt_sptlrpc_lock;
+ rwlock_t mdt_sptlrpc_lock;
struct sptlrpc_rule_set mdt_sptlrpc_rset;
/* capability keys */
mdt_som_conf:1;
/* statfs optimization: we cache a bit */
- struct obd_statfs mdt_osfs;
- __u64 mdt_osfs_age;
- cfs_spinlock_t mdt_osfs_lock;
+ struct obd_statfs mdt_osfs;
+ __u64 mdt_osfs_age;
+ spinlock_t mdt_osfs_lock;
/* root squash */
uid_t mdt_squash_uid;
cfs_list_t mdt_nosquash_nids;
char *mdt_nosquash_str;
int mdt_nosquash_strlen;
- cfs_rw_semaphore_t mdt_squash_sem;
+ struct rw_semaphore mdt_squash_sem;
cfs_proc_dir_entry_t *mdt_proc_entry;
struct lprocfs_stats *mdt_stats;
int mdt_sec_level;
struct rename_stats mdt_rename_stats;
+ struct lu_fid mdt_md_root_fid;
+
+ /* connection to quota master */
+ struct obd_export *mdt_qmt_exp;
+ /* quota master device associated with this MDT */
+ struct lu_device *mdt_qmt_dev;
};
#define MDT_SERVICE_WATCHDOG_FACTOR (2)
int mot_ioepoch_count;
int mot_writecount;
/* Lock to protect object's IO epoch. */
- cfs_mutex_t mot_ioepoch_mutex;
+ struct mutex mot_ioepoch_mutex;
/* Lock to protect create_data */
- cfs_mutex_t mot_lov_mutex;
+ struct mutex mot_lov_mutex;
};
enum mdt_object_flags {
const struct ldlm_request *mti_dlm_req;
__u32 mti_has_trans:1, /* has txn already? */
- mti_no_need_trans:1,
mti_cross_ref:1;
/* opdata for mdt_reint_open(), has the same as
/* Ops object filename */
struct lu_name mti_name;
+ /* per-thread values, can be re-used */
+ void *mti_big_lmm;
+ int mti_big_lmmsize;
+ /* big_lmm buffer was used and must be used in reply */
+ int mti_big_lmm_used;
+ /* should be enough to fit lustre_mdt_attrs */
+ char mti_xattr_buf[128];
};
static inline const struct md_device_operations *
MDT_SOM_ENABLE = 1,
};
+int mdt_attr_get_complex(struct mdt_thread_info *info,
+ struct mdt_object *o, struct md_attr *ma);
int mdt_ioepoch_open(struct mdt_thread_info *info, struct mdt_object *o,
int created);
int mdt_object_is_som_enabled(struct mdt_object *mo);
RETURN(0);
}
-struct md_ucred *mdt_ucred(const struct mdt_thread_info *info);
+struct lu_ucred *mdt_ucred(const struct mdt_thread_info *info);
+struct lu_ucred *mdt_ucred_check(const struct mdt_thread_info *info);
static inline int is_identity_get_disabled(struct upcall_cache *cache)
{
ldlm_mode_t mode,
ldlm_policy_data_t *policy,
const struct ldlm_res_id *res_id,
- int flags, const __u64 *client_cookie)
+ __u64 flags, const __u64 *client_cookie)
{
int rc;
rc = ldlm_cli_enqueue_local(ns, res_id, LDLM_IBITS, policy,
mode, &flags, mdt_blocking_ast,
ldlm_completion_ast, NULL, NULL, 0,
- client_cookie, lh);
+ LVB_T_NONE, client_cookie, lh);
return rc == ELDLM_OK ? 0 : -EIO;
}
return mdt_dlm_lock_modes[mode];
}
+/* mdt_lvb.c */
+extern struct ldlm_valblock_ops mdt_lvbo;
+
static inline struct lu_name *mdt_name(const struct lu_env *env,
char *name, int namelen)
{