Whamcloud - gitweb
LU-8648 all: remove all Sun license and URL references
[fs/lustre-release.git] / lustre / include / lustre / lustreapi.h
index 135a3c8..fa04465 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,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/
@@ -131,18 +127,24 @@ extern int llapi_file_get_stripe(const char *path, struct lov_user_md *lum);
 #define HAVE_LLAPI_FILE_LOOKUP
 extern int llapi_file_lookup(int dirfd, const char *name);
 
-#define VERBOSE_COUNT          0x1
-#define VERBOSE_SIZE           0x2
-#define VERBOSE_OFFSET         0x4
-#define VERBOSE_POOL           0x8
-#define VERBOSE_DETAIL         0x10
-#define VERBOSE_OBJID          0x20
-#define VERBOSE_GENERATION     0x40
-#define VERBOSE_MDTINDEX       0x80
-#define VERBOSE_LAYOUT         0x100
-#define VERBOSE_ALL            (VERBOSE_COUNT | VERBOSE_SIZE | \
+#define VERBOSE_COUNT             0x1
+#define VERBOSE_SIZE              0x2
+#define VERBOSE_OFFSET            0x4
+#define VERBOSE_POOL              0x8
+#define VERBOSE_DETAIL           0x10
+#define VERBOSE_OBJID            0x20
+#define VERBOSE_GENERATION       0x40
+#define VERBOSE_MDTINDEX         0x80
+#define VERBOSE_LAYOUT          0x100
+#define VERBOSE_COMP_COUNT      0x200
+#define VERBOSE_COMP_FLAGS      0x400
+#define VERBOSE_COMP_START      0x800
+#define VERBOSE_COMP_END       0x1000
+#define VERBOSE_COMP_ID                0x2000
+#define VERBOSE_DFID           0x4000
+#define VERBOSE_DEFAULT                (VERBOSE_COUNT | VERBOSE_SIZE | \
                                 VERBOSE_OFFSET | VERBOSE_POOL | \
-                                VERBOSE_OBJID | VERBOSE_GENERATION |\
+                                VERBOSE_OBJID | VERBOSE_GENERATION | \
                                 VERBOSE_LAYOUT)
 
 struct find_param {
@@ -264,9 +266,11 @@ 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;
@@ -299,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);
@@ -401,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 llapi_lu_ladvise *ladvise);
 /** @} llapi */
 
 /* llapi_layout user interface */
@@ -481,6 +491,16 @@ void llapi_layout_free(struct llapi_layout *layout);
 #define LLAPI_LAYOUT_RAID0     0
 
 /**
+* The layout includes a specific set of OSTs on which to allocate.
+*/
+#define LLAPI_LAYOUT_SPECIFIC  0x2000000000000000ULL
+
+/**
+ * A valid ost index should be less than maximum valid OST index (UINT_MAX).
+ */
+#define LLAPI_LAYOUT_IDX_MAX   0x00000000FFFFFFFFULL
+
+/**
  * Flags to modify how layouts are retrieved.
  */
 /******************** Stripe Count ********************/