* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
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;
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);
extern int llapi_ping(char *obd_type, char *obd_name);
extern int llapi_target_check(int num_types, char **obd_types, char *dir);
extern int llapi_file_get_lov_uuid(const char *path, struct obd_uuid *lov_uuid);
+extern int llapi_file_get_lmv_uuid(const char *path, struct obd_uuid *lmv_uuid);
extern int llapi_file_fget_lov_uuid(int fd, struct obd_uuid *lov_uuid);
extern int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count);
extern int llapi_lmv_get_uuids(int fd, struct obd_uuid *uuidp, int *mdt_count);
extern int llapi_get_version(char *buffer, int buffer_size, char **version);
extern int llapi_get_data_version(int fd, __u64 *data_version, __u64 flags);
+extern int llapi_hsm_state_get(const char *path, struct hsm_user_state *hus);
+extern int llapi_hsm_state_set(const char *path, __u64 setmask, __u64 clearmask,
+ __u32 archive_id);
extern int llapi_create_volatile_idx(char *directory, int idx, int mode);
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_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 */
#define CHANGELOG_FLAG_FOLLOW 0x01 /* Not yet implemented */
/* HSM copytool interface.
* priv is private state, managed internally by these functions
*/
-extern int llapi_hsm_copytool_start(void **priv, char *fsname, int flags,
+struct hsm_copytool_private;
+extern int llapi_hsm_copytool_start(struct hsm_copytool_private **priv,
+ char *fsname, int flags,
int archive_count, int *archives);
-extern int llapi_hsm_copytool_fini(void **priv);
-extern int llapi_hsm_copytool_recv(void *priv, struct hsm_action_list **hal,
- int *msgsize);
+extern int llapi_hsm_copytool_fini(struct hsm_copytool_private **priv);
+extern int llapi_hsm_copytool_recv(struct hsm_copytool_private *priv,
+ struct hsm_action_list **hal, int *msgsize);
extern int llapi_hsm_copytool_free(struct hsm_action_list **hal);
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 */
#endif