erofs: fix fsdax partition offset handling
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 13 Jan 2022 05:18:45 +0000 (13:18 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 24 Jan 2022 14:36:27 +0000 (22:36 +0800)
commite33f42b20bcb2f55cb1eeeab9956a503dcf36107
tree951d31f910e07f8f18679624c0c88272c2efb9a0
parente783362eb54cd99b2cac8b3a9aeac942e6f6ac07
erofs: fix fsdax partition offset handling

After seeking time on testing today upstream fsdax, I found it
actually doesn't work well as below:

[  186.492983] ------------[ cut here ]------------
[  186.493629] WARNING: CPU: 1 PID: 205 at fs/iomap/iter.c:33 iomap_iter+0x2f6/0x310

The problem is that m_dax_part_off should be applied to physical
addresses and very sorry about that I didn't catch this eariler.

Anyway, let's fix it up now. Also, I need to find a way to set up
a standalone testcase to look after this later.

Link: https://lore.kernel.org/r/20220113051845.244461-1-hsiangkao@linux.alibaba.com
Fixes: de2051147771 ("fsdax: shift partition offset handling into the file systems")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/data.c