[RHEL7,COMMIT] ext4: Disable ploop's fastmap for DAX

Submitted by Vasily Averin on Aug. 26, 2020, 6:47 a.m.

Details

Message ID 202008260647.07Q6lDCX002231@vz7build.vvs.sw.ru
State New
Series "ext4 read_iter/fastmap: DAX handling"
Headers show

Commit Message

Vasily Averin Aug. 26, 2020, 6:47 a.m.
The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.11
------>
commit 86df3c338ec97b89dc6e9738b4b340d1751724d9
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Wed Aug 26 09:47:12 2020 +0300

    ext4: Disable ploop's fastmap for DAX
    
    Patchset description:
    DAX may be enabled directly at mount time, while it's disabled
    by default.
    
    Despite we never enable it, the code must handle this case too
    
    Current patch description:
    It should be handled in other way, so disable it for now.
    
    https://jira.sw.ru/browse/PSBM-105347
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/ext4/file.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index cc39aff..1846544 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -139,6 +139,8 @@  static int ext4_fastmap(struct inode *inode, sector_t lblk_sec,
 		return -ENOENT;
 	if (ext4_should_journal_data(inode))
 		return -ENOENT;
+	if (IS_DAX(inode))
+		return -ENOENT;
 
 	unaligned_aio = ext4_unaligned_aio(inode, len, pos);
 	if (unaligned_aio)