Whamcloud - gitweb
LU-9341 lod: Add special O_APPEND striping
[fs/lustre-release.git] / lustre / include / dt_object.h
index 5ff7815..9e9f1db 100644 (file)
@@ -347,6 +347,16 @@ enum dt_index_flags {
         DT_IND_RANGE = 1 << 4,
 };
 
+/* for dt_read_lock() and dt_write_lock() object lock rule */
+enum dt_object_role {
+       DT_SRC_PARENT,
+       DT_SRC_CHILD,
+       DT_TGT_PARENT,
+       DT_TGT_CHILD,
+       DT_TGT_ORPHAN,
+       DT_LASTID,
+};
+
 /**
  * Features, required from index to support file system directories (mapping
  * names to fids).
@@ -379,6 +389,8 @@ struct dt_allocation_hint {
        const void              *dah_eadata;
        int                     dah_eadata_len;
        __u32                   dah_mode;
+       int                     dah_append_stripes;
+       char                    *dah_append_pool;
 };
 
 /**
@@ -2514,9 +2526,10 @@ static inline int dt_fiemap_get(const struct lu_env *env, struct dt_object *d,
         return d->do_body_ops->dbo_fiemap_get(env, d, fm);
 }
 
-static inline int dt_statfs(const struct lu_env *env, struct dt_device *dev,
-                           struct obd_statfs *osfs,
-                           struct obd_statfs_info *info)
+static inline int dt_statfs_info(const struct lu_env *env,
+                                struct dt_device *dev,
+                               struct obd_statfs *osfs,
+                               struct obd_statfs_info *info)
 {
        LASSERT(dev);
        LASSERT(dev->dd_ops);
@@ -2524,6 +2537,12 @@ static inline int dt_statfs(const struct lu_env *env, struct dt_device *dev,
        return dev->dd_ops->dt_statfs(env, dev, osfs, info);
 }
 
+static inline int dt_statfs(const struct lu_env *env, struct dt_device *dev,
+                           struct obd_statfs *osfs)
+{
+       return dt_statfs_info(env, dev, osfs, NULL);
+}
+
 static inline int dt_root_get(const struct lu_env *env, struct dt_device *dev,
                               struct lu_fid *f)
 {