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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jing Zhang <zj.barak@xxxxxxxxx>

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@xxxxxxx>
Cc: Andreas Dilger <adilger@xxxxxxx>
Cc: Dave Kleikamp <shaggy@xxxxxxxxxxxxxxxxxx>
Cc: Aneesh Kumar K. V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Jing Zhang <zj.barak@xxxxxxxxx>

---

--- 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux