linux/fs/f2fs
Jaegeuk Kim 9d5c4f5c7a f2fs: fix wrong block mapping for multi-devices
Assuming the disk layout as below,

disk0: 0            --- 0x00035abfff
disk1: 0x00035ac000 --- 0x00037abfff
disk2: 0x00037ac000 --- 0x00037ebfff

and we want to read data from offset=13568 having len=128 across the block
devices, we can illustrate the block addresses like below.

0 .. 0x00037ac000 ------------------- 0x00037ebfff, 0x00037ec000 -------
          |          ^            ^                                ^
          |   fofs   0            13568                            13568+128
          |       ------------------------------------------------------
          |   LBA    0x37e8aa9    0x37ebfa9                        0x37ec029
          --- map    0x3caa9      0x3ffa9

In this example, we should give the relative map of the target block device
ranging from 0x3caa9 to 0x3ffa9 where the length should be calculated by
0x37ebfff + 1 - 0x37ebfa9.

In the below equation, however, map->m_pblk was supposed to be the original
address instead of the one from the target block address.

 - map->m_len = min(map->m_len, dev->end_blk + 1 - map->m_pblk);

Cc: stable@vger.kernel.org
Fixes: 71f2c82062 ("f2fs: multidevice: support direct IO")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2025-10-13 23:55:44 +00:00
..
Kconfig f2fs: switch to using the crc32 library 2024-12-01 17:23:02 -08:00
Makefile
acl.c f2fs: Pass a folio to f2fs_getxattr() 2025-04-28 15:26:42 +00:00
acl.h f2fs: Pass folios to f2fs_init_acl() 2025-04-28 15:26:41 +00:00
checkpoint.c f2fs: add time stats of checkpoint for debug 2025-08-11 17:03:27 +00:00
compress.c f2fs: clean up f2fs_truncate_partial_cluster() 2025-08-11 17:03:55 +00:00
data.c f2fs: fix wrong block mapping for multi-devices 2025-10-13 23:55:44 +00:00
debug.c f2fs: introduce is_cur{seg,sec}() 2025-07-09 18:02:20 +00:00
dir.c f2fs: add lookup_mode mount option 2025-08-11 17:03:27 +00:00
extent_cache.c f2fs: add sanity check on ei.len in __update_extent_tree_range() 2025-09-28 20:04:29 +00:00
f2fs.h f2fs-for-6.18-rc1 2025-10-03 14:05:12 -07:00
file.c f2fs: fix to mitigate overhead of f2fs_zero_post_eof_page() 2025-09-16 04:23:43 +00:00
gc.c f2fs: fix to avoid migrating empty section 2025-09-16 02:12:11 +00:00
gc.h f2fs: add gc_boost_gc_greedy sysfs node 2025-07-29 15:02:36 +00:00
hash.c
inline.c f2fs: Add folio counterparts to page_private_flags functions 2025-07-22 15:57:05 +00:00
inode.c f2fs: drop inode from the donation list when the last file is closed 2025-07-30 17:13:12 +00:00
iostat.c f2fs: add async reset zone command support 2023-06-12 13:04:09 -07:00
iostat.h
namei.c f2fs: Use a folio in f2fs_encrypted_get_link() 2025-07-22 15:57:54 +00:00
node.c f2fs: avoid unnecessary folio_clear_uptodate() for cleanup 2025-09-09 03:26:41 +00:00
node.h f2fs: fix to do sanity check on node footer for non inode dnode 2025-08-28 00:09:01 +00:00
recovery.c f2fs: fix to do sanity check on node footer for non inode dnode 2025-08-28 00:09:01 +00:00
segment.c f2fs: allocate HOT_DATA for IPU writes 2025-09-02 20:16:04 +00:00
segment.h f2fs: clean up w/ get_left_section_blocks() 2025-08-20 17:44:10 +00:00
shrinker.c f2fs: handle error cases of memory donation 2025-05-06 15:46:55 +00:00
super.c f2fs: don't call iput() from f2fs_drop_inode() 2025-10-13 23:55:44 +00:00
sysfs.c f2fs: add missing dput() when printing the donation list 2025-10-03 03:16:10 +00:00
verity.c f2fs: move verity info pointer to fs-specific part of inode 2025-08-21 13:58:08 +02:00
xattr.c f2fs: Pass a folio to inline_xattr_addr() 2025-04-28 15:26:43 +00:00
xattr.h f2fs: Pass a folio to f2fs_getxattr() 2025-04-28 15:26:42 +00:00