-extern int llapi_file_open_param(const char *name, int flags, mode_t mode,
- const struct llapi_stripe_param *param);
-extern int llapi_file_create(const char *name, unsigned long long stripe_size,
- int stripe_offset, int stripe_count,
- int stripe_pattern);
-extern int llapi_file_open(const char *name, int flags, int mode,
- unsigned long long stripe_size, int stripe_offset,
- int stripe_count, int stripe_pattern);
-extern int llapi_file_create_pool(const char *name,
- unsigned long long stripe_size,
- int stripe_offset, int stripe_count,
- int stripe_pattern, char *pool_name);
-extern int llapi_file_open_pool(const char *name, int flags, int mode,
- unsigned long long stripe_size,
- int stripe_offset, int stripe_count,
- int stripe_pattern, char *pool_name);
-extern int llapi_poollist(const char *name);
-extern int llapi_get_poollist(const char *name, char **poollist, int list_size,
- char *buffer, int buffer_size);
-extern int llapi_get_poolmembers(const char *poolname, char **members,
- int list_size, char *buffer, int buffer_size);
-extern int llapi_file_get_stripe(const char *path, struct lov_user_md *lum);
-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_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_HASH_TYPE 0x8000
-#define VERBOSE_DEFAULT (VERBOSE_COUNT | VERBOSE_SIZE | \
- VERBOSE_OFFSET | VERBOSE_POOL | \
- VERBOSE_OBJID | VERBOSE_GENERATION | \
- VERBOSE_LAYOUT | VERBOSE_HASH_TYPE | \
- VERBOSE_COMP_COUNT | VERBOSE_COMP_FLAGS | \
- VERBOSE_COMP_START | VERBOSE_COMP_END | \
- VERBOSE_COMP_ID)
+#define lsp_tgts lsp_osts
+
+enum {
+ LLAPI_MIGRATION_NONBLOCK = 0x0001,
+ LLAPI_MIGRATION_MIRROR = 0x0002,
+ LLAPI_MIGRATION_NONDIRECT = 0x0004,
+ LLAPI_MIGRATION_VERBOSE = 0x0008,
+};
+
+__u32 llapi_pattern_to_lov(uint64_t pattern);
+
+int llapi_file_open_param(const char *name, int flags, mode_t mode,
+ const struct llapi_stripe_param *param);
+int llapi_file_is_encrypted(int fd);
+int llapi_file_create_foreign(const char *name, mode_t mode, __u32 type,
+ __u32 flags, char *foreign_lov);
+int llapi_file_create(const char *name, unsigned long long stripe_size,
+ int stripe_offset, int stripe_count, int stripe_pattern);
+int llapi_file_open(const char *name, int flags, int mode,
+ unsigned long long stripe_size, int stripe_offset,
+ int stripe_count, int stripe_pattern);
+int llapi_file_create_pool(const char *name, unsigned long long stripe_size,
+ int stripe_offset, int stripe_count,
+ int stripe_pattern, char *pool_name);
+int llapi_file_open_pool(const char *name, int flags, int mode,
+ unsigned long long stripe_size, int stripe_offset,
+ int stripe_count, int stripe_pattern, char *pool_name);
+int llapi_poollist(const char *name);
+int llapi_get_poolbuf(const char *name, char **buf,
+ char ***poolist, int *poolcount);
+int llapi_get_poollist(const char *name, char **poollist, int list_size,
+ char *buffer, int buffer_size);
+int llapi_get_poolmembers(const char *poolname, char **members, int list_size,
+ char *buffer, int buffer_size);
+int llapi_file_get_stripe(const char *path, struct lov_user_md *lum);
+int llapi_file_lookup(int dirfd, const char *name);
+void llapi_set_command_name(const char *cmd);
+void llapi_clear_command_name(void);
+
+enum llapi_layout_verbose {
+ VERBOSE_STRIPE_COUNT = 0x1,
+ VERBOSE_STRIPE_SIZE = 0x2,
+ VERBOSE_STRIPE_OFFSET = 0x4,
+ VERBOSE_POOL = 0x8,
+ VERBOSE_DETAIL = 0x10,
+ VERBOSE_OBJID = 0x20,
+ VERBOSE_GENERATION = 0x40,
+ VERBOSE_MDTINDEX = 0x80,
+ VERBOSE_PATTERN = 0x100,
+ VERBOSE_COMP_COUNT = 0x200,
+ VERBOSE_COMP_FLAGS = 0x400,
+ VERBOSE_COMP_START = 0x800,
+ VERBOSE_COMP_END = 0x1000,
+ VERBOSE_COMP_ID = 0x2000,
+ VERBOSE_DFID = 0x4000,
+ VERBOSE_HASH_TYPE = 0x8000,
+ VERBOSE_MIRROR_COUNT = 0x10000,
+ VERBOSE_MIRROR_ID = 0x20000,
+ VERBOSE_EXT_SIZE = 0x40000,
+ VERBOSE_INHERIT = 0x80000,
+ VERBOSE_INHERIT_RR = 0x100000,
+ VERBOSE_DEFAULT = VERBOSE_STRIPE_COUNT | VERBOSE_STRIPE_SIZE |
+ VERBOSE_STRIPE_OFFSET | VERBOSE_POOL |
+ VERBOSE_OBJID | VERBOSE_GENERATION |
+ VERBOSE_PATTERN | VERBOSE_HASH_TYPE |
+ VERBOSE_COMP_COUNT | VERBOSE_COMP_FLAGS |
+ VERBOSE_COMP_START | VERBOSE_COMP_END |
+ VERBOSE_COMP_ID | VERBOSE_MIRROR_COUNT |
+ VERBOSE_MIRROR_ID | VERBOSE_EXT_SIZE |
+ VERBOSE_INHERIT | VERBOSE_INHERIT_RR
+};
+/* Compatibility with original names */
+#define VERBOSE_SIZE VERBOSE_STRIPE_SIZE
+#define VERBOSE_COUNT VERBOSE_STRIPE_COUNT
+#define VERBOSE_OFFSET VERBOSE_STRIPE_OFFSET
+#define VERBOSE_LAYOUT VERBOSE_PATTERN
+
+enum {
+ NEWERXY_ATIME = 0, /* neweraY */
+ NEWERXY_MTIME = 1, /* newermY */
+ NEWERXY_CTIME = 2, /* newercY */
+ NEWERXY_BTIME = 3, /* newerbY | newerBY */
+ NEWERXY_MAX,
+};