Whamcloud - gitweb
LU-14291 lustre: further cleanup of acl code.
[fs/lustre-release.git] / lustre / mdt / mdt_internal.h
index a106e45..bdecb34 100644 (file)
@@ -56,7 +56,6 @@
 #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>
@@ -293,7 +292,9 @@ struct mdt_device {
                                   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 */
@@ -573,14 +574,10 @@ static inline struct mdt_thread_info *mdt_th_info(const struct lu_env *env)
 }
 
 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 {
@@ -747,7 +744,7 @@ static inline bool mdt_lmm_comp_overstriping(struct lov_mds_md *lmm)
 
        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);
 
@@ -1083,7 +1080,6 @@ struct cdt_agent_req *mdt_cdt_alloc_request(__u32 archive_id, __u64 flags,
 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,
@@ -1414,7 +1410,7 @@ static inline bool mdt_is_rootadmin(struct mdt_thread_info *info)
 
        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);