Linux-f2fs-devel Archive mirror
 help / color / mirror / Atom feed
From: Zhiguo Niu <zhiguo.niu@unisoc.com>
To: <jaegeuk@kernel.org>, <chao@kernel.org>
Cc: ke.wang@unisoc.com, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, hongyu.jin@unisoc.com,
	zhiguo.niu@unisoc.com, niuzhiguo84@gmail.com
Subject: [f2fs-dev] [PATCH v2 0/4] f2fs: fix panic issue in small capacity device
Date: Wed, 7 Feb 2024 10:01:00 +0800	[thread overview]
Message-ID: <1707271264-5551-1-git-send-email-zhiguo.niu@unisoc.com> (raw)

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



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

             reply	other threads:[~2024-02-07  2:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07  2:01 Zhiguo Niu [this message]
2024-02-07  2:01 ` [f2fs-dev] [PATCH v2 1/4] f2fs: correct counting methods of free_segments in __set_inuse Zhiguo Niu
2024-02-07  2:01 ` [f2fs-dev] [PATCH v2 2/4] f2fs: fix panic issue in update_sit_entry Zhiguo Niu
2024-02-07  2:01 ` [f2fs-dev] [PATCH v2 3/4] f2fs: enhance judgment conditions of GET_SEGNO Zhiguo Niu
2024-02-07  2:01 ` [f2fs-dev] [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1707271264-5551-1-git-send-email-zhiguo.niu@unisoc.com \
    --to=zhiguo.niu@unisoc.com \
    --cc=chao@kernel.org \
    --cc=hongyu.jin@unisoc.com \
    --cc=jaegeuk@kernel.org \
    --cc=ke.wang@unisoc.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niuzhiguo84@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).