From: Theodore Ts'o <tytso@mit.edu>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] resize2fs: fix over-pessimistic heuristic.
Date: Thu, 10 Apr 2014 23:39:15 -0400 [thread overview]
Message-ID: <20140411033915.GA21215@thunk.org> (raw)
In-Reply-To: <1396788965-11777-1-git-send-email-dmonakhov@openvz.org>
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
next prev parent reply other threads:[~2014-04-11 3:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-06 12:56 [PATCH] resize2fs: fix over-pessimistic heuristic Dmitry Monakhov
2014-04-11 3:39 ` Theodore Ts'o [this message]
2014-04-11 8:05 ` Dmitry Monakhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140411033915.GA21215@thunk.org \
--to=tytso@mit.edu \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).