linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: minor dumpe2fs issue
       [not found] <CAMXxnT4ihap2-wW97akNHDpjfUqE1rHOAeFtBsb33bKyGEWCuQ@mail.gmail.com>
@ 2017-03-15 21:48 ` Darrick J. Wong
  0 siblings, 0 replies; only message in thread
From: Darrick J. Wong @ 2017-03-15 21:48 UTC (permalink / raw)
  To: TR Reardon; +Cc: linux-ext4

[cc mailing list]

On Wed, Mar 15, 2017 at 05:29:52PM -0400, TR Reardon wrote:
> hey, I found a small issue with bigalloc & dumpe2fs, wonder if you'd
> fold a fix into your stream of updates?
> 
> basically, the printing of "Free blocks:" is wrong for bigalloc filesystems.
> 
> modest change below
> 
> +Reardon

This could use a more fully fleshed out description, such as "Ensure
that we print the start and end block number of free clusters even if
there's only a single free cluster."

Furthermore, does this change the output of the 'make check' tests?

> diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
> index 395ea9ee..3b829cd5 100644
> --- a/misc/dumpe2fs.c
> +++ b/misc/dumpe2fs.c
> @@ -97,9 +97,9 @@ static void print_free(unsigned long group, char * bitmap,
>                         print_number((i + offset) * ratio);
>                         for (j = i; j < num && !in_use (bitmap, j); j++)
>                                 ;
> -                       if (--j != i) {
> +                       if (--j != i || ratio > 1 ) {
>                                 fputc('-', stdout);
> -                               print_number((j + offset) * ratio);
> +                               print_number((j + offset + 1) * ratio - 1);

The code looks ok, but we cannot accept patches that lack a
Signed-off-by header.

Please see section 11 in submitting patches:
https://www.kernel.org/doc/Documentation/process/submitting-patches.rst

Also please cc the mailing list.

--D

>                                 i = j;
>                         }
>                         p = 1;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-15 21:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CAMXxnT4ihap2-wW97akNHDpjfUqE1rHOAeFtBsb33bKyGEWCuQ@mail.gmail.com>
2017-03-15 21:48 ` minor dumpe2fs issue Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).