Whamcloud - gitweb
LU-14050 utils: fix fraction output logic 34/39934/6
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 16 Sep 2020 19:14:42 +0000 (22:14 +0300)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Nov 2020 08:15:02 +0000 (08:15 +0000)
so that it doesn't suppress single line reports

Test-Parameters: trivial
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I9e374f8e769afcadc5cecbf529fa403deb544544
Reviewed-on: https://review.whamcloud.com/39934
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/ofd_access_batch.c

index d5d567b..c5b4180 100644 (file)
@@ -388,8 +388,6 @@ void *alr_sort_and_print_thread(void *arg)
 
        qsort(sa, nr, sizeof(*sa), sort_compare);
        i = nr * aa->fraction / 100;
 
        qsort(sa, nr, sizeof(*sa), sort_compare);
        i = nr * aa->fraction / 100;
-       if (i > 0)
-               i--;
        cut = sa[i];
        if (cut < 1)
                cut = 1;
        cut = sa[i];
        if (cut < 1)
                cut = 1;