#include <lustre_req_layout.h>
#include <lustre_sec.h>
#include <lustre_idmap.h>
-#include <lustre_eacl.h>
#include <lustre_quota.h>
#include <lustre_linkea.h>
#include <lustre_lmv.h>
enum {
NO_DOM_LOCK_ON_OPEN = 0,
TRYLOCK_DOM_ON_OPEN = 1,
+ /* not used anymore, left here for compatibility */
ALWAYS_DOM_LOCK_ON_OPEN = 2,
NUM_DOM_LOCK_ON_OPEN_MODES
};
mdt_skip_lfsck:1,
mdt_readonly:1,
/* dir restripe migrate dirent only */
- mdt_dir_restripe_nsonly:1;
+ mdt_dir_restripe_nsonly:1,
+ /* subdirectory mount of remote dir */
+ mdt_enable_remote_subdir_mount:1;
/* user with gid can create remote/striped
* dir, and set default dir stripe */
/* Regular lock */
struct lustre_handle mlh_reg_lh;
enum ldlm_mode mlh_reg_mode;
+ __u64 mlh_gid;
/* Pdirops lock */
struct lustre_handle mlh_pdo_lh;
}
struct cdt_req_progress {
- struct mutex crp_lock; /**< protect tree */
- struct interval_node *crp_root; /**< tree to track extent
+ spinlock_t crp_lock; /**< protect tree */
+ struct interval_tree_root crp_root; /**< tree to track extent
* moved */
- struct interval_node **crp_node; /**< buffer for tree nodes
- * vector of fixed size
- * vectors */
- int crp_cnt; /**< # of used nodes */
- int crp_max; /**< # of allocated nodes */
+ __u64 crp_total;
};
struct cdt_agent_req {
comp_v1 = (struct lov_comp_md_v1 *)lmm;
- for (i = 1; i < le16_to_cpu(comp_v1->lcm_entry_count); i++) {
+ for (i = 0; i < le16_to_cpu(comp_v1->lcm_entry_count); i++) {
off = le32_to_cpu(comp_v1->lcm_entries[i].lcme_offset);
v1 = (struct lov_mds_md *)((char *)comp_v1 + off);
const struct lu_name *lname);
void mdt_lock_reg_init(struct mdt_lock_handle *lh, enum ldlm_mode lm);
+void mdt_lh_reg_init(struct mdt_lock_handle *lh, struct ldlm_lock *lock);
int mdt_lock_setup(struct mdt_thread_info *info, struct mdt_object *mo,
struct mdt_lock_handle *lh);
struct mdt_object *o, const struct lu_fid *fid,
struct lustre_handle *lh,
enum ldlm_mode mode, __u64 ibits, bool cache);
+int mdt_object_local_lock(struct mdt_thread_info *info, struct mdt_object *o,
+ struct mdt_lock_handle *lh, __u64 *ibits,
+ __u64 trybits, bool cos_incompat);
int mdt_reint_striped_lock(struct mdt_thread_info *info,
struct mdt_object *o,
struct mdt_lock_handle *lh,
bool allow_client_chgrp(struct mdt_thread_info *info, struct lu_ucred *uc);
int mdt_check_ucred(struct mdt_thread_info *);
int mdt_init_ucred(struct mdt_thread_info *, struct mdt_body *);
-int mdt_init_ucred_intent_getattr(struct mdt_thread_info *, struct mdt_body *);
int mdt_init_ucred_reint(struct mdt_thread_info *);
void mdt_exit_ucred(struct mdt_thread_info *);
int mdt_version_get_check(struct mdt_thread_info *, struct mdt_object *, int);
struct mdt_body *repbody);
int mdt_pack_secctx_in_reply(struct mdt_thread_info *info,
struct mdt_object *child);
+int mdt_pack_encctx_in_reply(struct mdt_thread_info *info,
+ struct mdt_object *child);
static inline struct mdt_device *mdt_dev(struct lu_device *d)
{
void mdt_cdt_free_request(struct cdt_agent_req *car);
int mdt_cdt_add_request(struct coordinator *cdt, struct cdt_agent_req *new_car);
struct cdt_agent_req *mdt_cdt_find_request(struct coordinator *cdt, u64 cookie);
-void mdt_cdt_get_work_done(struct cdt_agent_req *car, __u64 *done_sz);
void mdt_cdt_get_request(struct cdt_agent_req *car);
void mdt_cdt_put_request(struct cdt_agent_req *car);
struct cdt_agent_req *mdt_cdt_update_request(struct coordinator *cdt,
uc = mdt_ucred(info);
is_admin = (uc->uc_uid == 0 && uc->uc_gid == 0 &&
- md_capable(uc, CFS_CAP_SYS_ADMIN));
+ md_capable(uc, CAP_SYS_ADMIN));
mdt_exit_ucred(info);