All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: Pavol Cvengros <pavol.cvengros@primeinteractive.net>,
	Justin Maggard <jmaggard10@gmail.com>,
	Eric Sandeen <sandeen@redhat.com>, Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: ext4+quota+nfs issue
Date: Tue, 15 Sep 2009 00:22:28 +0530	[thread overview]
Message-ID: <20090914185228.GA5984@skywalker.linux.vnet.ibm.com> (raw)
In-Reply-To: <20090914175056.GE25549@duck.suse.cz>

On Mon, Sep 14, 2009 at 07:50:56PM +0200, Jan Kara wrote:
>   I've found some time to look into this and I can see a few problems in
> the code. Firstly, what may cause your problems:
>   vfs_dq_claim_blocks() is called in ext4_mb_mark_diskspace_used(). But
> as far as I can understand the code, ext4_mb_normalize_request() can
> increase the amount of space we really allocate and thus we try to
> allocate more blocks than we have actually reserved in quota. Aneesh, is
> that right?

ext4_mb_mark_diskspace_used use ac->ac_b_ex.fe_len which is NOT the normalized
request len. it is min(allocated_len, original_len). So i guess that code
should be safe
 

>   Secondly, ext4_da_reserve_space() seems to have a bug that it can reserve
> quota blocks multiple times if ext4_claim_free_blocks() fail and we retry
> the allocation. We should release the quota reservation before restarting.
> Actually, when we find out we cannot reserve quota space, we could force
> some delayed allocated writes to disk (thus possibly release some quota
> in case we have overestimated the amount of blocks needed). But that's
> a different issue.

That would imply the file system was full. But the dumpe2fs ouput list
large number of free blocks. But yes the code should have released the
quota reservation before trying block reservation again.


>   Thirdly, ext4_indirect_calc_metadata_amount() is wrong for sparse files.
> The worst case is 3 metadata blocks per data block if we make the file
> sufficiently sparse and there's no easy way around that...
> 

-aneesh

  reply	other threads:[~2009-09-14 18:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-08  5:04 ext4+quota+nfs issue Pavol Cvengros
2009-09-09  4:16 ` Pavol Cvengros
2009-09-09  9:42   ` Jiri Kosina
2009-09-09 14:46     ` Jan Kara
2009-09-09 17:19       ` Pavol Cvengros
2009-09-09 15:02     ` Eric Sandeen
2009-09-09 17:45       ` Justin Maggard
2009-09-09 19:02         ` Pavol Cvengros
2009-09-11 14:33           ` Pavol Cvengros
2009-09-14 17:50             ` Jan Kara
2009-09-14 18:52               ` Aneesh Kumar K.V [this message]
2009-09-16  6:35                 ` Pavol Cvengros
2009-09-21 16:28                 ` Mingming
2009-09-09 21:32       ` Mingming
2009-09-10  3:21         ` Pavol Cvengros
2009-09-10 12:40         ` Jan Kara
2009-09-17 17:56 ` Nao Nakashima

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=20090914185228.GA5984@skywalker.linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=jack@suse.cz \
    --cc=jkosina@suse.cz \
    --cc=jmaggard10@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavol.cvengros@primeinteractive.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.