summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorEric Whitney <enwlinux@gmail.com>2014-11-23 06:55:42 +0100
committerTheodore Ts'o <tytso@mit.edu>2014-11-23 06:55:42 +0100
commitf4226d9ea400e7124120571b1e89504c79f2e953 (patch)
treec3c53be4a83b3293f0baf269737622c4ded94058 /init
parentext4: kill ext4_kvfree() (diff)
downloadlinux-f4226d9ea400e7124120571b1e89504c79f2e953.tar.xz
linux-f4226d9ea400e7124120571b1e89504c79f2e953.zip
ext4: fix partial cluster initialization
The partial_cluster variable is not always initialized correctly when hole punching on bigalloc file systems. Although commit c06344939422 ("ext4: fix partial cluster handling for bigalloc file systems") addressed the case where the right edge of the punched region and the next extent to its right were within the same leaf, it didn't handle the case where the next extent to its right is in the next leaf. This causes xfstest generic/300 to fail. Fix this by replacing the code in c0634493922 with a more general solution that can continue the search for the first cluster to the right of the punched region into the next leaf if present. If found, partial_cluster is initialized to this cluster's negative value. There's no need to determine if that cluster is actually shared; we simply record it so its blocks won't be freed in the event it does happen to be shared. Also, minimize the burden on non-bigalloc file systems with some minor code simplification. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions