alistair23-linux/fs/ext4
Ross Zwisler 559db4c6d7 ext4: prevent data corruption with inline data + DAX
If an inode has inline data it is currently prevented from using DAX by a
check in ext4_set_inode_flags().  When the inode grows inline data via
ext4_create_inline_data() or removes its inline data via
ext4_destroy_inline_data_nolock(), the value of S_DAX can change.

Currently these changes are unsafe because we don't hold off page faults
and I/O, write back dirty radix tree entries and invalidate all mappings.
There are also issues with mm-level races when changing the value of S_DAX,
as well as issues with the VM_MIXEDMAP flag:

https://www.spinics.net/lists/linux-xfs/msg09859.html

The unsafe transition of S_DAX can reliably cause data corruption, as shown
by the following fstest:

https://patchwork.kernel.org/patch/9948381/

Fix this issue by preventing the DAX mount option from being used on
filesystems that were created to support inline data.  Inline data is an
option given to mkfs.ext4.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
CC: stable@vger.kernel.org
2017-10-12 11:52:34 -04:00
..
acl.c ext4: Don't clear SGID when inheriting ACLs 2017-07-30 23:33:01 -04:00
acl.h
balloc.c ext4: retry allocations conservatively 2017-10-01 17:59:54 -04:00
bitmap.c
block_validity.c
dir.c ext4: use sizeof(*ptr) 2017-08-24 13:50:24 -04:00
ext4.h ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA 2017-10-01 17:58:54 -04:00
ext4_extents.h
ext4_jbd2.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
ext4_jbd2.h ext4, project: expand inode extra size if possible 2017-08-06 01:00:49 -04:00
extents.c ext4: fix interaction between i_size, fallocate, and delalloc after a crash 2017-10-06 23:09:55 -04:00
extents_status.c
extents_status.h
file.c ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA 2017-10-01 17:58:54 -04:00
fsmap.c ext4: fix off-by-one fsmap error on 1k block filesystems 2017-06-23 00:58:57 -04:00
fsmap.h
fsync.c VFS: Convert sb->s_flags & MS_RDONLY to sb_rdonly(sb) 2017-07-17 08:45:34 +01:00
hash.c ext4: remove useless test and assignment in strtohash functions 2017-08-24 15:11:34 -04:00
ialloc.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
indirect.c ext4: call journal revoke when freeing ea_inode blocks 2017-06-21 21:36:51 -04:00
inline.c ext4: prevent data corruption with inline data + DAX 2017-10-12 11:52:34 -04:00
inode.c ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA 2017-10-01 17:58:54 -04:00
ioctl.c ext4, project: expand inode extra size if possible 2017-08-06 01:00:49 -04:00
Kconfig ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA 2017-10-01 17:58:54 -04:00
Makefile
mballoc.c ext4: fix clang build regression 2017-08-14 08:29:18 -04:00
mballoc.h ext4: send parallel discards on commit completions 2017-06-22 23:54:33 -04:00
migrate.c ext4: do not set posix acls on xattr inodes 2017-06-21 21:21:39 -04:00
mmp.c Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-09-14 18:54:01 -07:00
move_extent.c ext4: add ext4_is_quota_file() 2017-06-22 11:31:25 -04:00
namei.c ext4: make xattr inode reads faster 2017-08-06 00:07:01 -04:00
page-io.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
readpage.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
resize.c ext4: fix overflow caused by missing cast in ext4_resize_fs() 2017-08-06 01:18:31 -04:00
super.c ext4: prevent data corruption with inline data + DAX 2017-10-12 11:52:34 -04:00
symlink.c
sysfs.c ext4: check return value of kstrtoull correctly in reserved_clusters_store 2017-06-23 01:08:22 -04:00
truncate.h
xattr.c ext4: backward compatibility support for Lustre ea_inode implementation 2017-08-24 14:25:02 -04:00
xattr.h ext4: fix __ext4_new_inode() journal credits calculation 2017-07-06 00:01:59 -04:00
xattr_security.c
xattr_trusted.c
xattr_user.c