linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-ext4@vger.kernel.org, Andreas Dilger <adilger@sun.com>,
	Alex Tomas <bzzz@sun.com>
Subject: Re: [PATCH, RFC -V2 4/4] ext4: Avoid group preallocation for closed files
Date: Thu, 20 Aug 2009 22:45:45 -0400	[thread overview]
Message-ID: <20090821024545.GA9529@mit.edu> (raw)
In-Reply-To: <20090820064035.GB23232@skywalker.linux.vnet.ibm.com>

On Thu, Aug 20, 2009 at 12:10:35PM +0530, Aneesh Kumar K.V wrote:
> > +	if ((size == isize) &&
> 
> What is this check supposed to help us ?. This would also imply we
> disable prealloc only if we are allocating the last chunk in the
> file.

That was the idea, yes; the idea was to disable preallocation if the
file is small enough that it could be written in a single call to
ext4_da_writepages, or if we are allocating/writing the last chunk in
a file.  Otherwise, preallocation would be a good thing.

> shouldn't it be !ext4_fs_is_busy(sbi) ?. Can you also write function
> documentation for ext4_fs_is_busy. I found in confusing that you are
> decrementing s_lock_busy if we are going to spin on spin_lock.

Um, oops.  Yeah, good point.  It should be !ext4_fs_is_busy().  I also
have the logic backwards in ext4_lock_group as well, so the two errors
mostly cancel each other out.  I'll fix that in the patch.

       	      	   	       	    	- Ted

  reply	other threads:[~2009-08-21  2:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  3:23 [PATCH, RFC -V2 0/4] mballoc patches for ext4 Theodore Ts'o
2009-08-10  3:23 ` [PATCH, RFC -V2 1/4] ext4: Add configurable run-time mballoc debugging Theodore Ts'o
2009-08-10  3:42   ` Eric Sandeen
2009-08-10 20:23     ` Theodore Tso
2009-08-11 18:15   ` Xiang Wang
2009-08-11 18:53     ` Theodore Tso
2009-08-10  3:23 ` [PATCH, RFC -V2 2/4] ext4: Display the mballoc flags in mb_history in hex instead of decimal Theodore Ts'o
2009-08-10  3:44   ` Eric Sandeen
2009-08-10  3:23 ` [PATCH, RFC -V2 3/4] ext4: Fix bugs in mballoc's stream allocation mode Theodore Ts'o
2009-08-20  7:22   ` Aneesh Kumar K.V
2009-08-20 18:20     ` Theodore Tso
2009-08-10  3:23 ` [PATCH, RFC -V2 4/4] ext4: Avoid group preallocation for closed files Theodore Ts'o
2009-08-20  6:40   ` Aneesh Kumar K.V
2009-08-21  2:45     ` Theodore Tso [this message]
2009-08-21 12:23       ` Theodore Tso

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=20090821024545.GA9529@mit.edu \
    --to=tytso@mit.edu \
    --cc=adilger@sun.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=bzzz@sun.com \
    --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).