Whamcloud - gitweb
LU-9341 utils: fix lfs find for composite files 11/35611/3
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 25 Jul 2019 05:29:26 +0000 (23:29 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 9 Aug 2019 04:39:41 +0000 (04:39 +0000)
commit72479a52be5f77f601d8234d957f5d6176edf6e8
tree4bf78488a3956f3523afcf671dbe840d036aead5
parent9283e2ed6655e89fe693d35313c9dcf1d5a6703a
LU-9341 utils: fix lfs find for composite files

Running "lfs getstripe -c" on a composite file returns the stripe
count of the last initialized component, but "lfs find -c N" does
not find this file because it was adding the total stripe_count
of all components.  "lfs find" should also check the stripe_count
of the last initialized component, as described in the man page.
Also use the last component stripe_size instead of any component.

Add a test case for the correct usage.

Fixes: 5a76aee24476 ("LU-8998 lfs: user space tools for PFL")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I1f0097aa002b29febcbf183cab02519b202540e5
Reviewed-on: https://review.whamcloud.com/35611
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Stephan Thiell <sthiell@stanford.edu>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lfs-find.1
lustre/tests/sanity-pfl.sh
lustre/utils/liblustreapi.c