[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUEBXuE56KCPWOoy@mit.edu>
Date: Tue, 14 Sep 2021 16:09:02 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 3/3] resize2fs: optimize
resize2fs_calculate_summary_stats()
On Tue, Sep 14, 2021 at 03:11:04PM -0400, Theodore Ts'o wrote:
> Speed up an off-line resize of a 10GB file system to 64TB located on
> tmpfs from 90 seconds to 16 seconds by extracting block group bitmaps
> using a population count function to count the blocks in use instead
> checking each bit in the block bitmap.
>
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
> resize/resize2fs.c | 74 ++++++++++++++--------------------------------
> 1 file changed, 23 insertions(+), 51 deletions(-)
>
> diff --git a/resize/resize2fs.c b/resize/resize2fs.c
> + retval = ext2fs_get_block_bitmap_range2(fs->block_map,
> + C2B(blk), fs->super->s_clusters_per_group, bitmap_buf);
Whoops, this should be B2C to convert a block number to a cluster
number.
Hmm, I note that this wasn't picked up by our regression tests.
Mental note to self --- we need to add more regression tests to better
exercise bigalloc resizes. Currently we have a big warning which gets
printed about off-line resizes of bigalloc file systems being
experimentlal, but we should aim to do better. :-)
- Ted
Powered by blists - more mailing lists