X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre%2Flustreapi.h;h=caaa780474cce13fc1f923f44b6ff6354a508732;hb=7b54fc7b1615f23a1ad9da84ba8e289de1f22d70;hp=2cf16691ac46f6e94b4b7af285b8c4b4a548a8d3;hpb=3a9176d5bbd62daa19402c2acf0205dd582d34f4;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre/lustreapi.h b/lustre/include/lustre/lustreapi.h index 2cf1669..caaa780 100644 --- a/lustre/include/lustre/lustreapi.h +++ b/lustre/include/lustre/lustreapi.h @@ -61,6 +61,14 @@ extern "C" { #define LOV_PATTERN_DEFAULT 0xffffffff #endif +#ifndef fallthrough +# if defined(__GNUC__) && __GNUC__ >= 7 +# define fallthrough __attribute__((fallthrough)) /* fallthrough */ +# else +# define fallthrough do {} while (0) /* fallthrough */ +# endif +#endif + typedef struct statx lstatx_t; #define lustre_fid struct lu_fid @@ -148,6 +156,13 @@ struct llapi_stripe_param { #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, @@ -377,7 +392,7 @@ struct find_param { unsigned long long fp_comp_end; unsigned long long fp_comp_end_units; unsigned long long fp_mdt_count; - unsigned fp_projid; + unsigned int fp_projid; unsigned long long fp_blocks; unsigned long long fp_blocks_units; @@ -400,6 +415,8 @@ struct find_param { int fp_bsign; unsigned int fp_hash_inflags; unsigned int fp_hash_exflags; + /* Print all information (lfs find only) */ + char *fp_format_printf_str; }; int llapi_ostlist(char *path, struct find_param *param); @@ -539,7 +556,8 @@ int llapi_swap_layouts(const char *path1, const char *path2, __u64 dv1, /* 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 extended 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 int llapi_changelog_start(void **priv, enum changelog_send_flag flags, @@ -815,8 +833,8 @@ int llapi_layout_merge(struct llapi_layout **dst_layout, #define LLAPI_LAYOUT_OVERSTRIPING 4ULL /** -* The layout includes a specific set of OSTs on which to allocate. -*/ + * The layout includes a specific set of OSTs on which to allocate. + */ #define LLAPI_LAYOUT_SPECIFIC 0x2000000000000000ULL /** @@ -981,7 +999,7 @@ int llapi_layout_pool_name_get(const struct llapi_layout *layout, * \retval -1 Invalid argument, errno set to EINVAL. */ int llapi_layout_pool_name_set(struct llapi_layout *layout, - char *pool_name); + const char *pool_name); /******************** File Creation ********************/ @@ -1092,6 +1110,7 @@ static const struct comp_flag_name { { LCME_FL_OFFLINE, "offline" }, { LCME_FL_NOSYNC, "nosync" }, { LCME_FL_EXTENSION, "extension" }, + { LCME_FL_PARITY, "parity" }, }; /** @@ -1202,8 +1221,7 @@ int llapi_mirror_punch(int fd, unsigned int id, off_t start, size_t length); int llapi_heat_get(int fd, struct lu_heat *heat); int llapi_heat_set(int fd, __u64 flags); -int llapi_layout_sanity(struct llapi_layout *layout, const char *fname, - bool incomplete, bool flr); +int llapi_layout_sanity(struct llapi_layout *layout, bool incomplete, bool flr); void llapi_layout_sanity_perror(int error); int llapi_layout_dom_size(struct llapi_layout *layout, uint64_t *size);