android_kernel_motorola_sm6375/fs/ext4
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Matthew Bobrowski e48a603448 ext4: iomap that extends beyond EOF should be marked dirty
[ Upstream commit 2e9b51d78229d5145725a481bb5464ebc0a3f9b2 ]

This patch addresses what Dave Chinner had discovered and fixed within
commit: 7684e2c4384d. This changes does not have any user visible
impact for ext4 as none of the current users of ext4_iomap_begin()
that extend files depend on IOMAP_F_DIRTY.

When doing a direct IO that spans the current EOF, and there are
written blocks beyond EOF that extend beyond the current write, the
only metadata update that needs to be done is a file size extension.

However, we don't mark such iomaps as IOMAP_F_DIRTY to indicate that
there is IO completion metadata updates required, and hence we may
fail to correctly sync file size extensions made in IO completion when
O_DSYNC writes are being used and the hardware supports FUA.

Hence when setting IOMAP_F_DIRTY, we need to also take into account
whether the iomap spans the current EOF. If it does, then we need to
mark it dirty so that IO completion will call generic_write_sync() to
flush the inode size update to stable storage correctly.

Signed-off-by: Matthew Bobrowski <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Ritesh Harjani <[email protected]>
Link: https://lore.kernel.org/r/8b43ee9ee94bee5328da56ba0909b7d2229ef150.1572949325.git.mbobrowski@mbobrowski.org
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2020-01-04 19:17:13 +01:00
..
acl.c
acl.h
balloc.c
bitmap.c
block_validity.c ext4: fix potential use after free after remounting with noblock_validity 2019-08-28 11:13:24 -04:00
dir.c ext4: check for directory entries too close to block end 2019-12-31 16:46:17 +01:00
ext4.h Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: fix warning inside ext4_convert_unwritten_extents_endio 2019-08-22 22:53:46 -04:00
extents_status.c ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
extents_status.h ext4: use percpu_counters for extent_status cache hits/misses 2019-08-28 11:19:23 -04:00
file.c Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
fsmap.c
fsmap.h
fsync.c
hash.c ext4: fix kernel oops caused by spurious casefold flag 2019-09-03 01:43:17 -04:00
ialloc.c ext4: fix leak of quota reservations 2019-12-17 19:56:53 +01:00
indirect.c
inline.c ext4: set error return correctly when ext4_htree_store_dirent fails 2019-08-12 14:29:38 -04:00
inode.c ext4: iomap that extends beyond EOF should be marked dirty 2020-01-04 19:17:13 +01:00
ioctl.c Added new ext4 debugging ioctls to allow userspace to get information 2019-09-21 13:37:39 -07:00
Kconfig
Makefile ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
mballoc.c
mballoc.h
migrate.c
mmp.c
move_extent.c
namei.c ext4: fix ext4_empty_dir() for directories with holes 2019-12-31 16:46:16 +01:00
page-io.c
readpage.c ext4: add fs-verity read support 2019-08-12 19:33:51 -07:00
resize.c
super.c ext4: validate the debug_want_extra_isize mount option at parse time 2019-12-31 16:46:19 +01:00
symlink.c
sysfs.c ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
truncate.h
verity.c ext4: add basic fs-verity support 2019-08-12 19:33:50 -07:00
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c