Whamcloud - gitweb
EX-9029 lfs: not iterate compr_type_table using ARRAY_SIZE
authorBobi Jam <bobijam@whamcloud.com>
Wed, 24 Jan 2024 15:35:37 +0000 (23:35 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 29 Jan 2024 08:57:18 +0000 (08:57 +0000)
commita9cfa645d9b940b6a1c6688422aba7084101b2ad
tree434a3384b231f806bd1e095bd856e0fb2cfb1957
parent3e1dd9d6aeb0cf1898e703f8d0104c8c2490b56c
EX-9029 lfs: not iterate compr_type_table using ARRAY_SIZE

EX-8311 patch modifies compr_type_table to contain NULL fields in the
array, so iterate over the array should not use ARRAY_SIZE, but skip
those elements with NULL compression type name.

Fixes: ec5814c9a7 ("EX-8311 csdc: allow specify 'fast'/'best' compression type")
Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I8e4988fd3a63c1cb66f75510d190c2ebc4f8f9be
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53808
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_user.h
lustre/obdclass/lustre_compr.c
lustre/utils/liblustreapi.c
lustre/utils/liblustreapi_layout.c