[PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added in ext4_mb_use_preallocated()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: jing zhang
Date: Wednesday, April 7, 2010 - 6:25 am

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();
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] ext4: check for EXT4_MB_HINT_NOPREALLOC is added i ..., jing zhang, (Wed Apr 7, 6:25 am)