]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: Drop EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE flag
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 31 May 2010 02:49:26 +0000 (22:49 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:12 +0000 (10:21 -0700)
commit6595162b533a3e8d450dd13caec28758892d1be1
treec34f0a092b61778fe94c1f5d513b0911e4b38753
parent8b1213929317c582956da6c76400c8ba3898d35e
ext4: Drop EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE flag

commit 1296cc85c26e94eb865d03f82140f27d598de467 upstream (as of v2.6.33-rc6)

We should update reserve space if it is delalloc buffer
and that is indicated by EXT4_GET_BLOCKS_DELALLOC_RESERVE flag.
So use EXT4_GET_BLOCKS_DELALLOC_RESERVE in place of
EXT4_GET_BLOCKS_UPDATE_RESERVE_SPACE

[ Stable note: This fixes a corruption cuased by the following
  reproduction case:

  rm -f $TEST_FN
  touch $TEST_FN
  fallocate -n -o 656712 -l 858907 $TEST_FN
  dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=1011020 count=36983
  sync
  dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=332121 count=24005
  dd if=/dev/zero of=$TEST_FN conv=notrunc bs=1 seek=1040179 count=93319

  If the filesystem is then unmounted and e2fsck run forced, the
  i_blocks field for the file $TEST_FN will be found to be incorrect. ]

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/inode.c