mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
ext4: fix bigalloc regression
commitd0abafac8cupstream. Commitf5a44db5d2introduced 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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3655a197b1
commit
70139b6643
@@ -4123,7 +4123,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
|
||||
*/
|
||||
map->m_flags &= ~EXT4_MAP_FROM_CLUSTER;
|
||||
newex.ee_block = cpu_to_le32(map->m_lblk);
|
||||
cluster_offset = EXT4_LBLK_CMASK(sbi, map->m_lblk);
|
||||
cluster_offset = EXT4_LBLK_COFF(sbi, map->m_lblk);
|
||||
|
||||
/*
|
||||
* If we are doing bigalloc, check to see if the extent returned
|
||||
|
||||
Reference in New Issue
Block a user