From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>,
linux-ext4@vger.kernel.org, cmm@us.ibm.com
Subject: Re: [PATCH] ext4: fix sleep inside spinlock issue aka #14739
Date: Fri, 18 Dec 2009 15:32:40 +0530 [thread overview]
Message-ID: <20091218100240.GB9437@skywalker.linux.vnet.ibm.com> (raw)
In-Reply-To: <20091210161553.GG26516@atrey.karlin.mff.cuni.cz>
On Thu, Dec 10, 2009 at 05:15:53PM +0100, Jan Kara wrote:
> > drop i_block_reservation_lock before vfs_dq_reserve_block().
> > this patch fix http://bugzilla.kernel.org/show_bug.cgi?id=14739
> >
> > Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> Sorry if someone already refused this (I didn't follow the previous
> discussion too closely) but: Looking at the code I see no reason why
> ext4_claim_free_blocks needs i_block_reservation_lock. In fact mballoc
> calls this function without the lock. So could not we just compute
> 'total' under the lock, release it, reserve quota and then claim free
> blocks? You'd get rid of undoing the block reservation and obtain quota
> and blocks in the usual order...
The code is protecting i_reserved_meta_blocks. We are recalculating the
the value and need to make sure we don't get the value wrong. I guess
we need to hold i_block_reservation_lock while we recalculate the
meta data block.
-aneesh
prev parent reply other threads:[~2009-12-18 10:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 1:42 [PATCH] ext4: fix sleep inside spinlock issue aka #14739 Dmitry Monakhov
2009-12-10 16:15 ` Jan Kara
2009-12-10 17:22 ` [PATCH] ext4: fix sleep inside spinlock issue aka #14739 V2 Dmitry Monakhov
2009-12-15 21:48 ` Jan Kara
2009-12-15 23:16 ` Dmitry Monakhov
2009-12-15 23:44 ` Jan Kara
2009-12-18 10:06 ` Aneesh Kumar K.V
2009-12-19 15:11 ` Dmitry Monakhov
2009-12-18 10:02 ` Aneesh Kumar K.V [this message]
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=20091218100240.GB9437@skywalker.linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=dmonakhov@openvz.org \
--cc=jack@suse.cz \
--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).