linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tytso@mit.edu
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 3/3] ext4: don't use quota reservation for speculative metadata blocks
Date: Thu, 20 May 2010 19:10:41 -0400	[thread overview]
Message-ID: <20100520231041.GF16634@thunk.org> (raw)
In-Reply-To: <4BBCFF68.1060000@redhat.com>

On Wed, Apr 07, 2010 at 04:55:52PM -0500, Eric Sandeen wrote:
> Because we can badly over-reserve metadata when we
> calculate worst-case, it complicates things for quota, since
> we must reserve and then claim later, retry on EDQUOT, etc.
> Quota is also a generally smaller pool than fs free blocks,
> so this over-reservation hurts more, and more often.
> 
> I'm of the opinion that it's not the worst thing to allow
> metadata to push a user slightly over quota.  This simplifies
> the code and avoids the false quota rejections that result
> from worst-case speculation.
> 
> This patch stops the speculative quota-charging for
> worst-case metadata requirements, and just charges quota
> when the blocks are allocated at writeout.  It also is
> able to remove the try-again loop on EDQUOT.
> 
> This patch has been tested indirectly by running the xfstests
> suite with a hack to mount & enable quota prior to the test.
> 
> I also did a more specific test of fragmenting freespace
> and then doing a large delalloc write under quota; quota
> stopped me at the right amount of file IO, and then the
> writeout generated enough metadata (due to the fragmentation)
> that it put me slightly over quota, as expected.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Applied to the ext4 patch queue; there were slight adjustments to make
the patch apply.

Note: I did some testing of this patch, and found the following
warnings getting emitted when I ran fsstress:

fsstress -d /scratch/fsstress -n 100 -p 10

[   93.338647] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 594944). There's a risk of filesystem corruption in case of system crash.
[   93.390107] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 594944). There's a risk of filesystem corruption in case of system crash.
[  149.249765] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 594142). There's a risk of filesystem corruption in case of system crash.
[  149.305717] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 594142). There's a risk of filesystem corruption in case of system crash.
[  152.523048] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 590048). There's a risk of filesystem corruption in case of system crash.
[  152.544641] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 590048). There's a risk of filesystem corruption in case of system crash.
[  154.147876] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 590049). There's a risk of filesystem corruption in case of system crash.
[  154.192645] JBD: Spotted dirty metadata buffer (dev = sdc1, blocknr = 590049). There's a risk of filesystem corruption in case of system crash.

... but I found the same warning messages after I removed your patch,
so presumably this is a pre-existing condition with quotas and ext4.
Has anyone looked into this?

					- Ted

  parent reply	other threads:[~2010-05-20 23:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 21:45 [PATCH 0/3] ext4: don't use quota reservation for speculative metadata blocks Eric Sandeen
2010-04-07 21:49 ` [PATCH 1/3] quota: use flags interface for dquot alloc/free space Eric Sandeen
2010-04-12 13:22   ` Jan Kara
2010-05-20 22:29   ` tytso
2010-04-07 21:52 ` [PATCH 2/3] quota: add the option to not fail with EDQUOT in block allocation Eric Sandeen
2010-04-12 13:23   ` Jan Kara
2010-05-20 22:32   ` tytso
2010-04-07 21:55 ` [PATCH 3/3] ext4: don't use quota reservation for speculative metadata blocks Eric Sandeen
2010-04-12 13:36   ` Jan Kara
2010-05-20 23:10   ` tytso [this message]
2010-04-08  8:20 ` [PATCH 0/3] " Dmitry Monakhov
2010-04-08 15:28   ` Eric Sandeen
2010-04-11  9:37     ` Dmitry Monakhov
2010-04-12 13:15       ` Jan Kara
2010-04-12 13:22         ` Jan Kara
2010-04-12 13:40           ` Dmitry Monakhov
2010-04-12 13:33         ` Dmitry Monakhov
2010-04-12 13:37           ` Dmitry Monakhov
2010-04-12 13:42           ` tytso
2010-04-12 13:52             ` Dmitry Monakhov
2010-04-12 13:55           ` Jan Kara
2010-04-12 14:08             ` Dmitry Monakhov
2010-04-12 14:24               ` Jan Kara
2010-04-12 15:50                 ` Eric Sandeen
2010-04-12  2:20 ` tytso
2010-04-12 14:03   ` Jan Kara

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=20100520231041.GF16634@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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).