[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170315214804.GN5281@birch.djwong.org>
Date: Wed, 15 Mar 2017 14:48:04 -0700
From: "Darrick J. Wong" <darrick.wong@...cle.com>
To: TR Reardon <reardonia@...il.com>
Cc: linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: minor dumpe2fs issue
[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;
Powered by blists - more mailing lists