diff options
author | Eric Whitney <enwlinux@gmail.com> | 2014-01-06 14:00:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 15:24:27 -0500 |
commit | 70139b6643db61809db76dd642af87979421d41d (patch) | |
tree | 2344da65d804396f4e4c246c7f10f1b99394f023 /fs | |
parent | 3655a197b1ea3ce989d34868768c5f4b6205061c (diff) |
ext4: fix bigalloc regression
commit d0abafac8c9162f39c4f6b2f8141b772a09b3770 upstream.
Commit f5a44db5d2 introduced a regression on filesystems created with
the bigalloc feature (cluster size > blocksize). It causes xfstests
generic/006 and /013 to fail with an unexpected JBD2 failure and
transaction abort that leaves the test file system in a read only state.
Other xfstests run on bigalloc file systems are likely to fail as well.
The cause is the accidental use of a cluster mask where a cluster
offset was needed in ext4_ext_map_blocks().
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/extents.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index ecabf00829e2..a2b625e279db 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -4123,7 +4123,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, | |||
4123 | */ | 4123 | */ |
4124 | map->m_flags &= ~EXT4_MAP_FROM_CLUSTER; | 4124 | map->m_flags &= ~EXT4_MAP_FROM_CLUSTER; |
4125 | newex.ee_block = cpu_to_le32(map->m_lblk); | 4125 | newex.ee_block = cpu_to_le32(map->m_lblk); |
4126 | cluster_offset = EXT4_LBLK_CMASK(sbi, map->m_lblk); | 4126 | cluster_offset = EXT4_LBLK_COFF(sbi, map->m_lblk); |
4127 | 4127 | ||
4128 | /* | 4128 | /* |
4129 | * If we are doing bigalloc, check to see if the extent returned | 4129 | * If we are doing bigalloc, check to see if the extent returned |