Whamcloud - gitweb
LU-5969 lustreapi: replace llapi_get_version()
[fs/lustre-release.git] / lustre / include / lustre / lustreapi.h
index 6d2d512..3f0cf97 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2014, Intel Corporation.
+ * Copyright (c) 2011, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -46,6 +46,8 @@
 #include <stdint.h>
 #include <lustre/lustre_user.h>
 
+#define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
+
 extern bool liblustreapi_initialized;
 
 
@@ -264,17 +266,16 @@ extern int llapi_search_mounts(const char *pathname, int index,
                                char *mntdir, char *fsname);
 extern int llapi_search_fsname(const char *pathname, char *fsname);
 extern int llapi_getname(const char *path, char *buf, size_t size);
+extern int llapi_search_fileset(const char *pathname, char *fileset);
 
 extern int llapi_search_rootpath(char *pathname, const char *fsname);
 extern int llapi_nodemap_exists(const char *name);
+extern int llapi_migrate_mdt(char *path, struct find_param *param);
 extern int llapi_mv(char *path, struct find_param *param);
 
 struct mntent;
 #define HAVE_LLAPI_IS_LUSTRE_MNT
 extern int llapi_is_lustre_mnt(struct mntent *mnt);
-extern int llapi_quotachown(char *path, int flag);
-extern int llapi_quotacheck(char *mnt, int check_type);
-extern int llapi_poll_quotacheck(char *mnt, struct if_quotacheck *qchk);
 extern int llapi_quotactl(char *mnt, struct if_quotactl *qctl);
 extern int llapi_target_iterate(int type_num, char **obd_type, void *args,
                                llapi_cb_t cb);
@@ -302,7 +303,10 @@ extern int llapi_chomp_string(char *buf);
 extern int llapi_open_by_fid(const char *dir, const lustre_fid *fid,
                             int open_flags);
 
-extern int llapi_get_version(char *buffer, int buffer_size, char **version);
+extern int llapi_get_version_string(char *version, unsigned int version_size);
+/* llapi_get_version() is deprecated, use llapi_get_version_string() instead */
+extern int llapi_get_version(char *buffer, int buffer_size, char **version)
+       __attribute__((deprecated));
 extern int llapi_get_data_version(int fd, __u64 *data_version, __u64 flags);
 extern int llapi_hsm_state_get_fd(int fd, struct hsm_user_state *hus);
 extern int llapi_hsm_state_get(const char *path, struct hsm_user_state *hus);
@@ -323,17 +327,19 @@ static inline int llapi_create_volatile(char *directory, int mode)
 }
 
 
-extern int llapi_fswap_layouts(const int fd1, const int fd2,
-                              __u64 dv1, __u64 dv2, __u64 flags);
+extern int llapi_fswap_layouts_grouplock(int fd1, int fd2, __u64 dv1, __u64 dv2,
+                                        int gid, __u64 flags);
+extern int llapi_fswap_layouts(int fd1, int fd2, __u64 dv1, __u64 dv2,
+                              __u64 flags);
 extern int llapi_swap_layouts(const char *path1, const char *path2,
                              __u64 dv1, __u64 dv2, __u64 flags);
 
 /* Changelog interface.  priv is private state, managed internally by these
  * functions */
 
-/* Records received are in extentded format now, though most of them are still
+/* Records received are in extended format now, though most of them are still
  * written in disk in changelog_rec format (to save space and time), it's
- * converted to extented format in the lustre api to ease changelog analysis. */
+ * converted to extended format in the lustre api to ease changelog analysis. */
 #define HAVE_CHANGELOG_EXTEND_REC 1
 
 extern int llapi_changelog_start(void **priv, enum changelog_send_flag flags,
@@ -402,6 +408,9 @@ extern int llapi_lease_put(int fd);
 int llapi_group_lock(int fd, int gid);
 int llapi_group_unlock(int fd, int gid);
 
+/* Ladvise */
+int llapi_ladvise(int fd, unsigned long long flags, int num_advise,
+                 struct lu_ladvise *ladvise);
 /** @} llapi */
 
 /* llapi_layout user interface */