linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v2 0/2] f2fs: Add sanity checks before unlinking and loading inodes
@ 2025-11-01 12:56 Nikola Z. Ivanov
  2025-11-01 12:56 ` [f2fs-dev] [PATCH v2 1/2] f2fs: Rename f2fs_unlink exit label Nikola Z. Ivanov
  2025-11-01 12:56 ` [f2fs-dev] [PATCH v2 2/2] f2fs: Add sanity checks before unlinking and loading inodes Nikola Z. Ivanov
  0 siblings, 2 replies; 6+ messages in thread
From: Nikola Z. Ivanov @ 2025-11-01 12:56 UTC (permalink / raw)
  To: jaegeuk, chao, linux-f2fs-devel
  Cc: david.hunter.linux, linux-kernel, khalid, skhan,
	linux-kernel-mentees, Nikola Z. Ivanov

This series is provoked by syzbot warnings caused by corrupted directory
inode with i_nlink == 1 that passes the initial sanity check which will
only mark the filesystem as corrupted in case i_nlink == 0.

Tests:
- fio/fsmark parallel create/unlink on VM with f2fs root filesystem.
- syzbot

Changelog:
Changes from v1:
- Rename exit label in f2fs_unlink().
- Add sanity check in sanity_check_inode() and remove it from f2fs_iget().
  as suggested by Chao Yu in order to detect on-disk corruption early.
https://lore.kernel.org/linux-f2fs-devel/d4b7c03c-6554-4407-b823-aecfcdf7dc3f@kernel.org/T/#t

Nikola Z. Ivanov (2):
  f2fs: Rename f2fs_unlink exit label
  f2fs: Add sanity checks before unlinking and loading  inodes

 fs/f2fs/inode.c | 10 ++++++++++
 fs/f2fs/namei.c | 27 +++++++++++++++++----------
 2 files changed, 27 insertions(+), 10 deletions(-)

-- 
2.51.0



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

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

end of thread, other threads:[~2025-11-03  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 12:56 [f2fs-dev] [PATCH v2 0/2] f2fs: Add sanity checks before unlinking and loading inodes Nikola Z. Ivanov
2025-11-01 12:56 ` [f2fs-dev] [PATCH v2 1/2] f2fs: Rename f2fs_unlink exit label Nikola Z. Ivanov
2025-11-01 12:56 ` [f2fs-dev] [PATCH v2 2/2] f2fs: Add sanity checks before unlinking and loading inodes Nikola Z. Ivanov
2025-11-03  2:35   ` Chao Yu via Linux-f2fs-devel
2025-11-03  7:55     ` Nikola Z. Ivanov
2025-11-03  8:12       ` Chao Yu via Linux-f2fs-devel

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 NNTP newsgroup(s).