]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: don't release reserved space for previously allocated cluster
authorEric Whitney <enwlinux@gmail.com>
Fri, 3 Apr 2015 04:17:31 +0000 (00:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 3 Apr 2015 04:17:31 +0000 (00:17 -0400)
commitbdc7a9c6422706356d2d879d4613e526b551bc77
treeed314e29ce48935af0aa4d81632092ff7b3b8073
parentf381cf47cd837635b826998c407f1bf7c159ad16
ext4: don't release reserved space for previously allocated cluster

When xfstests' auto group is run on a bigalloc filesystem with a
4.0-rc3 kernel, e2fsck failures and kernel warnings occur for some
tests. e2fsck reports incorrect iblocks values, and the warnings
indicate that the space reserved for delayed allocation is being
overdrawn at allocation time.

Some of these errors occur because the reserved space is incorrectly
decreased by one cluster when ext4_ext_map_blocks satisfies an
allocation request by mapping an unused portion of a previously
allocated cluster.  Because a cluster's worth of reserved space was
already released when it was first allocated, it should not be released
again.

This patch appears to correct the e2fsck failure reported for
generic/232 and the kernel warnings produced by ext4/001, generic/009,
and generic/033.  Failures and warnings for some other tests remain to
be addressed.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents.c