]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ext4: enforce online defrag restriction for encrypted files
authorEric Whitney <enwlinux@gmail.com>
Mon, 29 Aug 2016 19:45:11 +0000 (15:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Oct 2016 10:06:48 +0000 (12:06 +0200)
commite97a8cca79378b94ed2f80b27e91d12a8b989c10
tree24f99f3ba3fed6a7664fd6fe4a83ba066c9ba46c
parentfbc7b803831e5c8a42c1f3427a17e55a814d6b3c
ext4: enforce online defrag restriction for encrypted files

commit 14fbd4aa613bd5110556c281799ce36dc6f3ba97 upstream.

Online defragging of encrypted files is not currently implemented.
However, the move extent ioctl can still return successfully when
called.  For example, this occurs when xfstest ext4/020 is run on an
encrypted file system, resulting in a corrupted test file and a
corresponding test failure.

Until the proper functionality is implemented, fail the move extent
ioctl if either the original or donor file is encrypted.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/move_extent.c