1
0
Fork 0
alistair23-linux/fs/ext4
Theodore Ts'o 5012284700 ext4: fix check to prevent initializing reserved inodes
Commit 8844618d8aa7: "ext4: only look at the bg_flags field if it is
valid" will complain if block group zero does not have the
EXT4_BG_INODE_ZEROED flag set.  Unfortunately, this is not correct,
since a freshly created file system has this flag cleared.  It gets
almost immediately after the file system is mounted read-write --- but
the following somewhat unlikely sequence will end up triggering a
false positive report of a corrupted file system:

   mkfs.ext4 /dev/vdc
   mount -o ro /dev/vdc /vdc
   mount -o remount,rw /dev/vdc

Instead, when initializing the inode table for block group zero, test
to make sure that itable_unused count is not too large, since that is
the case that will result in some or all of the reserved inodes
getting cleared.

This fixes the failures reported by Eric Whiteney when running
generic/230 and generic/231 in the the nojournal test case.

Fixes: 8844618d8a ("ext4: only look at the bg_flags field if it is valid")
Reported-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2018-07-29 15:34:00 -04:00
..
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acl.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
balloc.c ext4: check for allocation block validity with block group locked 2018-07-12 19:08:05 -04:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c ext4: use 'sbi' instead of 'EXT4_SB(sb)' 2018-01-11 13:17:49 -05:00
dir.c ext4: force revalidation of directory pointer after seekdir(2) 2018-04-01 23:21:03 -04:00
ext4.h Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
ext4_extents.h ext4: verify the depth of extent tree in ext4_find_extent() 2018-06-14 12:55:10 -04:00
ext4_jbd2.c ext4: shutdown should not prevent get_write_access 2018-02-18 22:07:36 -05:00
ext4_jbd2.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
extents.c Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
extents_status.c ext4: remove NULL check before calling kmem_cache_destroy() 2018-05-20 22:44:13 -04:00
extents_status.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
file.c ext4: do not update s_last_mounted of a frozen fs 2018-05-13 22:54:44 -04:00
fsmap.c ext4: make function ‘ext4_getfsmap_find_fixed_metadata’ static 2018-05-10 11:50:04 -04:00
fsmap.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
fsync.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hash.c ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
ialloc.c ext4: fix check to prevent initializing reserved inodes 2018-07-29 15:34:00 -04:00
indirect.c ext4: fix hole length detection in ext4_ind_map_blocks() 2018-05-12 19:55:00 -04:00
inline.c ext4: fix inline data updates with checksums enabled 2018-07-10 01:07:43 -04:00
inode.c ext4: fix inline data updates with checksums enabled 2018-07-10 01:07:43 -04:00
ioctl.c ext4: remove EXT4_STATE_DIOREAD_LOCK flag 2018-03-22 11:52:10 -04:00
mballoc.c Bug fixes for ext4; most of which relate to vulnerabilities where a 2018-07-08 11:10:30 -07:00
mballoc.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
migrate.c ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
mmp.c ext4: clear mmp sequence number when remounting read-only 2018-07-08 19:36:02 -04:00
move_extent.c ext4: remove EXT4_STATE_DIOREAD_LOCK flag 2018-03-22 11:52:10 -04:00
namei.c Merge branch 'vfs_timespec64' of https://github.com/deepa-hub/vfs into vfs-timespec64 2018-06-14 14:54:00 +02:00
page-io.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
readpage.c fscrypt: allow synchronous bio decryption 2018-05-02 14:30:57 -07:00
resize.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
super.c ext4: fix check to prevent initializing reserved inodes 2018-07-29 15:34:00 -04:00
symlink.c ext4: switch to fscrypt_get_symlink() 2018-01-11 22:10:40 -05:00
sysfs.c ext4: simplify procfs code 2018-05-16 07:24:30 +02:00
truncate.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
xattr.c ext4: avoid running out of journal credits when appending to an inline file 2018-06-16 23:41:59 -04:00
xattr.h ext4: add extra checks to ext4_xattr_block_get() 2018-03-30 20:04:11 -04:00
xattr_security.c ext4: use XATTR_CREATE in ext4_initxattrs() 2018-05-10 11:52:14 -04:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00