summaryrefslogtreecommitdiff
path: root/include/linux/i2c/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorYongpeng Yang <yangyongpeng@xiaomi.com>2026-02-03 21:36:35 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2026-03-24 17:20:59 +0000
commit68a0178981a0f493295afa29f8880246e561494c (patch)
tree816ecd13fcf02dd133194644a0edca1b7e853e49 /include/linux/i2c/git@git.tavy.me:linux-stable.git
parent5604129b6504c2d6dfbc02515c43e6186a1285e7 (diff)
f2fs: fix incorrect file address mapping when inline inode is unwritten
When `fileinfo->fi_flags` does not have the `FIEMAP_FLAG_SYNC` bit set and inline data has not been persisted yet, the physical address of the extent is calculated incorrectly for unwritten inline inodes. root@vm:/mnt/f2fs# dd if=/dev/zero of=data.3k bs=3k count=1 root@vm:/mnt/f2fs# f2fs_io fiemap 0 100 data.3k Fiemap: offset = 0 len = 100 logical addr. physical addr. length flags 0 0000000000000000 00000ffffffff16c 0000000000000c00 00000301 This patch fixes the issue by checking if the inode's address is valid. If the inline inode is unwritten, set the physical address to 0 and mark the extent with `FIEMAP_EXTENT_UNKNOWN | FIEMAP_EXTENT_DELALLOC` flags. Cc: stable@kernel.org Fixes: 67f8cf3cee6f ("f2fs: support fiemap for inline_data") Signed-off-by: Yongpeng Yang <yangyongpeng@xiaomi.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/i2c/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions