From: Aneesh Kumar K.V Date: Tue, 16 Mar 2010 00:25:57 +0000 (-0400) Subject: ext4: Make sure all the block allocation paths reserve blocks X-Git-Tag: v2.6.27.47~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05b6ea26438ab615144075c14a484d0d7940934f;p=pandora-kernel.git ext4: Make sure all the block allocation paths reserve blocks commit a30d542a0035b886ffaafd0057ced0a2b28c3a4f upstream. With delayed allocation we need to make sure block are reserved before we attempt to allocate them. Otherwise we get block allocation failure (ENOSPC) during writepages which cannot be handled. This would mean silent data loss (We do a printk stating data will be lost). This patch updates the DIO and fallocate code path to do block reservation before block allocation. This is needed to make sure parallel DIO and fallocate request doesn't take block out of delayed reserve space. When free blocks count go below a threshold we switch to a slow patch which looks at other CPU's accumulated percpu counter values. Signed-off-by: Aneesh Kumar K.V Signed-off-by: "Theodore Ts'o" Signed-off-by: Jayson R. King Signed-off-by: Theodore Ts'o Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed