public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] f2fs: fix panic issue in small capacity device
@ 2024-02-07  2:01 Zhiguo Niu
  2024-02-07  2:01 ` [PATCH v2 1/4] f2fs: correct counting methods of free_segments in __set_inuse Zhiguo Niu
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Zhiguo Niu @ 2024-02-07  2:01 UTC (permalink / raw)
  To: jaegeuk, chao
  Cc: linux-f2fs-devel, linux-kernel, niuzhiguo84, zhiguo.niu, ke.wang,
	hongyu.jin

A panic issue happened in a reboot test in small capacity device
as following:
1.The device size is 64MB, and main area has 24 segments, and
CONFIG_F2FS_CHECK_FS is not enabled.
2.There is no any free segments left shown in free_segmap_info,
then another write request cause get_new_segment get a out-of-bound
segment with segno 24.
3.panic happen in update_sit_entry because access invalid bitmap
pointer.

More detail shown in following patch sets.
The three patches are splited here because the modifications are
relatively independent and more readable.

---
Changes of v2: stop checkpoint when get a out-of-bound segment
---

Zhiguo Niu (4):
  f2fs: correct counting methods of free_segments in __set_inuse
  f2fs: fix panic issue in update_sit_entry
  f2fs: enhance judgment conditions of GET_SEGNO
  f2fs: stop checkpoint when get a out-of-bounds segment

 fs/f2fs/file.c          |  7 ++++++-
 fs/f2fs/segment.c       | 21 ++++++++++++++++-----
 fs/f2fs/segment.h       |  7 ++++---
 include/linux/f2fs_fs.h |  1 +
 4 files changed, 27 insertions(+), 9 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-02-28  1:21 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  2:01 [PATCH v2 0/4] f2fs: fix panic issue in small capacity device Zhiguo Niu
2024-02-07  2:01 ` [PATCH v2 1/4] f2fs: correct counting methods of free_segments in __set_inuse Zhiguo Niu
2024-02-07  2:01 ` [PATCH v2 2/4] f2fs: fix panic issue in update_sit_entry Zhiguo Niu
2024-02-07  2:01 ` [PATCH v2 3/4] f2fs: enhance judgment conditions of GET_SEGNO Zhiguo Niu
2024-02-07  2:01 ` [PATCH v2 4/4] f2fs: stop checkpoint when get a out-of-bounds segment Zhiguo Niu
2024-02-08  0:16   ` Jaegeuk Kim
2024-02-19  7:14     ` Chao Yu
2024-02-21 18:10 ` [f2fs-dev] [PATCH v2 0/4] f2fs: fix panic issue in small capacity device patchwork-bot+f2fs
2024-02-22 12:30 ` Chao Yu
     [not found]   ` <CAHJ8P3KYY27M3v=9Lu-yD2ufxU1fdG-bg=G92AbpnLUx0zLz3g@mail.gmail.com>
2024-02-23  2:38     ` Chao Yu
2024-02-26  3:25       ` Zhiguo Niu
2024-02-26  6:48         ` Chao Yu
2024-02-27  1:13         ` Jaegeuk Kim
2024-02-27  2:34           ` Zhiguo Niu
2024-02-27 17:18             ` Jaegeuk Kim
2024-02-28  1:00               ` Zhiguo Niu
2024-02-28  1:21               ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox