linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added in ext4_mb_use_preallocated()
@ 2010-04-07 13:25 jing zhang
  2010-04-07 15:17 ` tytso
  0 siblings, 1 reply; 2+ messages in thread
From: jing zhang @ 2010-04-07 13:25 UTC (permalink / raw)
  To: linux-ext4
  Cc: Theodore Ts'o, Andreas Dilger, Dave Kleikamp,
	Aneesh Kumar K. V

From: Jing Zhang <zj.barak@gmail.com>

Date: Wed Apr 7 21:23:48     2010

Since preallocation may not be require by allocation request, check
for it in ext4_mb_use_preallocated() seems necessary.

Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Aneesh Kumar K. V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Jing Zhang <zj.barak@gmail.com>

---

--- linux-2.6.32/fs/ext4/mballoc.c	2009-12-03 11:51:22.000000000 +0800
+++ ext4_mm_leak/mballoc-15.c	2010-04-07 20:16:22.000000000 +0800
@@ -3101,6 +3101,8 @@ ext4_mb_use_preallocated(struct ext4_all
 	/* only data can be preallocated */
 	if (!(ac->ac_flags & EXT4_MB_HINT_DATA))
 		return 0;
+	if (ac->ac_flags & EXT4_MB_HINT_NOPREALLOC)
+		return 0;

 	/* first, try per-file preallocation */
 	rcu_read_lock();

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added in ext4_mb_use_preallocated()
  2010-04-07 13:25 [PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added in ext4_mb_use_preallocated() jing zhang
@ 2010-04-07 15:17 ` tytso
  0 siblings, 0 replies; 2+ messages in thread
From: tytso @ 2010-04-07 15:17 UTC (permalink / raw)
  To: jing zhang; +Cc: linux-ext4, Andreas Dilger, Dave Kleikamp, Aneesh Kumar K. V

On Wed, Apr 07, 2010 at 09:25:53PM +0800, jing zhang wrote:
> From: Jing Zhang <zj.barak@gmail.com>
> 
> Date: Wed Apr 7 21:23:48     2010
> 
> Since preallocation may not be require by allocation request, check
> for it in ext4_mb_use_preallocated() seems necessary.

NACK.  If there is a file-specific preallocation that had been created
from a previous allocation (that wasn't completely used up), we want
to use it up, even if we don't want to create any new per-file
preallocations.

						- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-07 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-07 13:25 [PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added in ext4_mb_use_preallocated() jing zhang
2010-04-07 15:17 ` tytso

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).