Whamcloud - gitweb
LU-11549 mdd: set LUSTRE_ORPHAN_FL for non-dirs
[fs/lustre-release.git] / lustre / include / md_object.h
index 718be0c..72e7719 100644 (file)
@@ -130,9 +130,11 @@ struct md_attr {
        struct md_som            ma_som;
        struct lov_mds_md       *ma_lmm;
        union lmv_mds_md        *ma_lmv;
+       struct lmv_user_md      *ma_default_lmv;
        void                    *ma_acl;
        int                      ma_lmm_size;
        int                      ma_lmv_size;
+       int                      ma_default_lmv_size;
        int                      ma_acl_size;
 };
 
@@ -156,6 +158,9 @@ struct md_op_spec {
        void            *sp_cr_file_secctx; /* xattr value */
        size_t           sp_cr_file_secctx_size; /* xattr value size */
 
+       /* Archive ID used for auto PCC attach when create newly files. */
+       __u32            sp_archive_id;
+
        /** don't create lov objects or llog cookie - this replay */
        unsigned int no_create:1,
                     sp_cr_lookup:1, /* do lookup sanity check or not. */
@@ -230,11 +235,12 @@ struct md_object_operations {
                            struct lu_buf *buf);
 
        int (*moo_changelog)(const struct lu_env *env,
-                            enum changelog_rec_type type, int flags,
+                            enum changelog_rec_type type,
+                            enum changelog_rec_flags clf_flags,
                             struct md_device *m, const struct lu_fid *fid);
 
-       int (*moo_open)(const struct lu_env *env,
-                       struct md_object *obj, u64 open_flags);
+       int (*moo_open)(const struct lu_env *env, struct md_object *obj,
+                       u64 open_flags, struct md_op_spec*);
 
        int (*moo_close)(const struct lu_env *env, struct md_object *obj,
                         struct md_attr *ma, u64 open_flags);
@@ -413,8 +419,8 @@ static inline int mo_readlink(const struct lu_env *env,
 
 static inline int mo_changelog(const struct lu_env *env,
                               enum changelog_rec_type type,
-                              int flags, struct md_device *m,
-                              const struct lu_fid *fid)
+                              enum changelog_rec_flags clf_flags,
+                              struct md_device *m, const struct lu_fid *fid)
 {
        struct lu_fid rootfid;
        struct md_object *root;
@@ -429,7 +435,7 @@ static inline int mo_changelog(const struct lu_env *env,
                RETURN(PTR_ERR(root));
 
        LASSERT(root->mo_ops->moo_changelog);
-       rc = root->mo_ops->moo_changelog(env, type, flags, m, fid);
+       rc = root->mo_ops->moo_changelog(env, type, clf_flags, m, fid);
 
        lu_object_put(env, &root->mo_lu);
 
@@ -506,10 +512,10 @@ static inline int mo_swap_layouts(const struct lu_env *env,
 }
 
 static inline int mo_open(const struct lu_env *env, struct md_object *m,
-                         u64 open_flags)
+                         u64 open_flags, struct md_op_spec *spec)
 {
        LASSERT(m->mo_ops->moo_open);
-       return m->mo_ops->moo_open(env, m, open_flags);
+       return m->mo_ops->moo_open(env, m, open_flags, spec);
 }
 
 static inline int mo_close(const struct lu_env *env, struct md_object *m,
@@ -655,17 +661,6 @@ static inline int mdo_statfs(const struct lu_env *env,
        return m->md_ops->mdo_statfs(env, m, sfs);
 }
 
-/**
- * Used in MDD/OUT layer for object lock rule
- **/
-enum mdd_object_role {
-       MOR_SRC_PARENT,
-       MOR_SRC_CHILD,
-       MOR_TGT_PARENT,
-       MOR_TGT_CHILD,
-       MOR_TGT_ORPHAN
-};
-
 struct dt_device;
 
 void lustre_som_swab(struct lustre_som_attrs *attrs);