Whamcloud - gitweb
LU-14337 lov: return valid stripe_count/size for PFL files
Dump struct lov_comp_md_v1 in function ll_lov_getstripe_ea_info()
correctly to avoid stripe_count=0 or stripe_size=0 returned by
old interface llapi_file_get_stripe(), which will cause
divide-by-zero for older userspace that calls this ioctl,
e.g. lustre ADIO driver.
The rule is:
- if stripe_count=0, return stripe_count=1;
- if stripe_size=0,
-- for DoM files, return the stripe size of the second component,
since the first component of DoM file data is placed on the
MDT for faster access;
-- else, return the stripe size of the last component.
Also, lov_getstripe_old.c and santy-pfl.sh test_25 is added to
verify this patch.
Test-parameters: testlist=sanity-pfl env=ONLY=25
Signed-off-by: Emoly Liu <emoly@whamcloud.com>
Change-Id: I4023ca4baff1b1ad2a439aa497baaabc56e891d2
Reviewed-on: https://review.whamcloud.com/41803
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>