Whamcloud - gitweb
LU-2714 hsm: limit MDT-side allocations for HSM RPCs
[fs/lustre-release.git] / lustre / include / lustre / lustreapi.h
index 1d10f7f..22cf4ce 100644 (file)
@@ -163,11 +163,14 @@ struct find_param {
         int                    *mdtindexes;
         int                     file_mdtindex;
 
-        int     lumlen;
-        struct  lov_user_mds_data *lmd;
+       int     lumlen;
+       struct  lov_user_mds_data *lmd;
 
         char poolname[LOV_MAXPOOLNAME + 1];
 
+       int                     fp_lmv_count;
+       struct lmv_user_md      *fp_lmv_md;
+
         unsigned long long stripesize;
         unsigned long long stripesize_units;
         unsigned long long stripecount;
@@ -186,6 +189,10 @@ extern int llapi_getstripe(char *path, struct find_param *param);
 extern int llapi_find(char *path, struct find_param *param);
 
 extern int llapi_file_fget_mdtidx(int fd, int *mdtidx);
+extern int llapi_dir_create_pool(const char *name, int flags, int stripe_offset,
+                                int stripe_count, int stripe_pattern,
+                                char *poolname);
+int llapi_direntry_remove(char *dname);
 extern int llapi_obd_statfs(char *path, __u32 type, __u32 index,
                      struct obd_statfs *stat_buf,
                      struct obd_uuid *uuid_buf);
@@ -244,6 +251,9 @@ static inline int llapi_create_volatile(char *directory, int mode)
 }
 
 
+extern int llapi_fswap_layouts(const int fd1, const int fd2);
+extern int llapi_swap_layouts(const char *path1, const char *path2);
+
 /* Changelog interface.  priv is private state, managed internally
    by these functions */
 #define CHANGELOG_FLAG_FOLLOW 0x01   /* Not yet implemented */
@@ -278,15 +288,16 @@ extern int llapi_hsm_copy_start(char *mnt, struct hsm_copy *copy,
                                const struct hsm_action_item *hai);
 extern int llapi_hsm_copy_end(char *mnt, struct hsm_copy *copy,
                              const struct hsm_progress *hp);
-extern int llapi_hsm_request(char *mnt, struct hsm_user_request *request);
 extern int llapi_hsm_progress(char *mnt, struct hsm_progress *hp);
-extern struct hsm_user_request *llapi_hsm_user_request_alloc(int itemcount,
-                                                            int data_len);
 extern int llapi_hsm_import(const char *dst, int archive, struct stat *st,
                            unsigned long long stripe_size, int stripe_offset,
                            int stripe_count, int stripe_pattern,
                            char *pool_name, lustre_fid *newfid);
+
 /* HSM user interface */
+extern struct hsm_user_request *llapi_hsm_user_request_alloc(int itemcount,
+                                                            int data_len);
+extern int llapi_hsm_request(char *mnt, struct hsm_user_request *request);
 extern int llapi_hsm_current_action(const char *path,
                                    struct hsm_current_action *hca);
 /** @} llapi */