linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: "Amit K. Arora" <aarora@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org, suparna@in.ibm.com,
	suzuki@in.ibm.com, alex@clusterfs.com
Subject: Re: [RFC][Patch 1/2] Persistent preallocation in ext4
Date: Tue, 02 Jan 2007 14:47:32 -0800	[thread overview]
Message-ID: <1167778052.4197.3.camel@dyn9047017103.beaverton.ibm.com> (raw)
In-Reply-To: <20070102110409.GB5932@amitarora.in.ibm.com>

On Tue, 2007-01-02 at 16:34 +0530, Amit K. Arora wrote:
> Hi Mingming,
> > And, Looking at other places calling ext4_*_get_blocks() in the kernel,
> > it seems not all of them protected by i_mutex lock. I think it probably
> > okay to not holding i_mutex during calling ext4_ext4_get_blocks().
> 
> We are not holding i_mutex lock during ext4_ext_get_blocks() call.
> Above, this lock is being held inorder to avoid race while updating the
> filesize in inode (reference your comment in a previous mail "I think we
> should update i_size and i_disksize after preallocation. Oh,
> to protect parallel updating i_size, we have to take i_mutex down.").
> Perhaps, truncate_mutex lock should be used here, and not i_mutex.
> 

truncate_mutex is hold at the entry of ext4_**_get_blocks() to protect
parallel block allocation. Here I was worried about concurrent modifying
i_size and i_disksize which were protected by the i_mutex lock. Sorry
for any confusion.

  reply	other threads:[~2007-01-02 22:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-05 13:43 [RFC][Patch 1/1] Persistent preallocation in ext4 Amit K. Arora
2006-12-06  5:58 ` Amit K. Arora
2006-12-12  1:28   ` Mingming Cao
2006-12-12  6:23     ` Amit K. Arora
2006-12-13  0:20       ` Mingming Cao
2006-12-13 10:01         ` Amit K. Arora
2006-12-13 13:36           ` Dave Kleikamp
2006-12-13 15:38             ` Suparna Bhattacharya
2006-12-13 15:54             ` Mingming Cao
2006-12-15 12:35   ` [RFC][Patch 1/2] " Amit K. Arora
2006-12-19 11:05     ` Amit K. Arora
     [not found]       ` <20061219211206.GO5937@schatzie.adilger.int>
2006-12-20  6:28         ` Amit K. Arora
2006-12-27 23:30     ` Mingming Cao
2007-01-02 11:04       ` Amit K. Arora
2007-01-02 22:47         ` Mingming Cao [this message]
2007-01-09  9:05         ` Amit K. Arora
2006-12-15 12:39 ` [RFC][Patch 2/2] " Amit K. Arora
2006-12-15 23:02   ` Andreas Dilger
2006-12-16  4:30     ` Amit K. Arora
2006-12-19 11:42   ` Amit K. Arora
2006-12-19 11:54     ` Amit K. Arora
2006-12-19 21:14     ` Andreas Dilger
2006-12-19 21:23       ` Eric Sandeen
2006-12-20  8:19         ` Amit K. Arora
2006-12-22 15:16       ` Amit K. Arora
2006-12-22 15:31         ` Alex Tomas

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=1167778052.4197.3.camel@dyn9047017103.beaverton.ibm.com \
    --to=cmm@us.ibm.com \
    --cc=aarora@linux.vnet.ibm.com \
    --cc=alex@clusterfs.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=suparna@in.ibm.com \
    --cc=suzuki@in.ibm.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).