linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: ext4: Do not dec quota for reserved blocks on error paths v2
Date: Tue, 04 May 2010 15:22:45 -0500	[thread overview]
Message-ID: <4BE08215.2050603@redhat.com> (raw)
In-Reply-To: <87bpd3ecya.fsf@openvz.org>

Dmitry Monakhov wrote:
> If we have failed some where inside ext4_get_blocks() internals we may
> have allocated some new blocks, which was not yet claimed to quota.
> We have to free such blocks, but without touching quota. Quota will
> be updated later on exit from ext4_get_blocks().
> There are two possible ways to understand what we have to skip quota update:
> 1) Caller pass corresponding flag to ext4_free_blocks()
> 2) check that free_blocks() was indirectly called by get_blocks() 
>    (i.e EXT4_I(inode)->i_delalloc_reserved_flag is set)
> Second is simpler, but may result in unpredictable consequences later.
> So i've chosen the first one, because caller must know which blocks it
> is freeing.
> 
> Eric, please take your attention to metadata blocks handling when
> you will work on new versing of  "ext4: don't use quota reservation for
> speculative metadata blocks" patch.
> 
> The bug happens on heavily loaded node, or with 227'th xfstestcase and

hm which test?  227 is xfs-only...

-Eric

> result in incorrect i_blocks (less than expected). So truncation for
> that file result in i_blocks overflow.
> Seems this was the last bug which was easily triggered by 227'th testcase.
> 
> 


  reply	other threads:[~2010-05-04 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27  4:47 [PATCH] ext4: Do not dec quota for reserved blocks on error paths Dmitry Monakhov
2010-04-27  7:14 ` Dmitry Monakhov
2010-04-28 16:53 ` ext4: Do not dec quota for reserved blocks on error paths v2 Dmitry Monakhov
2010-05-04 20:22   ` Eric Sandeen [this message]
2010-05-05  7:05     ` Dmitry Monakhov
2010-05-05 15:51       ` Eric Sandeen
2010-05-25 14:02   ` tytso

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=4BE08215.2050603@redhat.com \
    --to=sandeen@redhat.com \
    --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).