From 5222ba07e3bd087ddb0812e2185610b725cb9d1a Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Tue, 22 Oct 2019 17:31:22 -0600 Subject: [PATCH] LU-10070 utils: move new SEL find_param fields to end Move the new fp_ext_size and fp_ext_size_units fields to the end of struct find_param so that they don't break the ABI for the llapi_find() and llapi_getstripe() functions that use it. Add "unused" fields for the sign and exclude bitfields, so that it is clear how many more can still be used before we need to add new fields. Test-Parameters: trivial Signed-off-by: Andreas Dilger Change-Id: Ib15af374774050a9e5b224f7edc7523fdae570c1 Reviewed-on: https://review.whamcloud.com/36554 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Vitaly Fertman Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin --- lustre/include/lustre/lustreapi.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre/lustreapi.h b/lustre/include/lustre/lustreapi.h index 17b19f8..237dc65 100644 --- a/lustre/include/lustre/lustreapi.h +++ b/lustre/include/lustre/lustreapi.h @@ -214,7 +214,11 @@ struct find_param { fp_mirror_id_sign:2, fp_mdt_count_sign:2, fp_blocks_sign:2, - fp_ext_size_sign:2; + fp_ext_size_sign:2, + fp_unused1_sign:2, /* Fields available to use*/ + fp_unused2_sign:2, /* Once used we must add */ + fp_unused3_sign:2, /* a separate flag field */ + fp_unused4_sign:2; /* at end of the struct. */ unsigned long long fp_size; unsigned long long fp_size_units; @@ -274,7 +278,14 @@ struct find_param { fp_exclude_foreign:1, fp_check_ext_size:1, /* extension size */ fp_exclude_ext_size:1, - fp_lazy:1; + fp_lazy:1, + fp_unused_bit1:1, + fp_unused_bit2:1, /* All of these unused bit */ + fp_unused_bit3:1, /* fields available to use.*/ + fp_unused_bit4:1, /* Once all unused fields */ + fp_unused_bit5:1, /* are used we need to add */ + fp_unused_bit6:1, /* a separate flag field at*/ + fp_unused_bit7:1; /* the end of the struct. */ enum llapi_layout_verbose fp_verbose; int fp_quiet; @@ -325,16 +336,15 @@ struct find_param { unsigned fp_projid; unsigned long long fp_blocks; unsigned long long fp_blocks_units; - unsigned long long fp_ext_size; - unsigned long long fp_ext_size_units; - /* In-process parameters. */ unsigned long fp_got_uuids:1, fp_obds_printed:1; unsigned int fp_depth; unsigned int fp_hash_type; unsigned int fp_time_margin; /* time margin in seconds */ __u32 fp_foreign_type; + unsigned long long fp_ext_size; + unsigned long long fp_ext_size_units; }; int llapi_ostlist(char *path, struct find_param *param); -- 1.8.3.1