Whamcloud - gitweb
LU-4931 ladvise: Add feature of giving file access advices
[fs/lustre-release.git] / lustre / include / lustre / lustreapi.h
index ce5f6ce..340bec5 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;
 
 
@@ -402,6 +404,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 */