[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140411033915.GA21215@thunk.org>
Date: Thu, 10 Apr 2014 23:39:15 -0400
From: Theodore Ts'o <tytso@....edu>
To: Dmitry Monakhov <dmonakhov@...nvz.org>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH] resize2fs: fix over-pessimistic heuristic.
On Sun, Apr 06, 2014 at 04:56:05PM +0400, Dmitry Monakhov wrote:
> In worst case we need one extent per moved block. Number of blocks to
> be moved is less or equals to blks_needed.
I can believe that the original safety margin of 0.2% of how much we
will be shrinking the file system might have been overly pessimistic.
However I'm concerned that your change might be over-optimistic. For
example, if we are shrinking the file system down to under 500 blocks,
then the safety_margin will be 0 --- but it's could very easily be the
case that an extent tree will need to grow.
I'd accept this change, although I don't know it would make a
difference in the cases you are concerned about:
blk64_t safe_margin = (ext2fs_blocks_count(fs->super) -
blks_needed)/500;
if (safe_margin > blks_needed)
safe_margin = blks_needed;
How and why are you using this? I've never been all that exicited
about the -M option, since it's been abused in so many different ways,
and the result when you compress the file system that significantly is
often no good for performance.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists