linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V3 0/7] f2fs: new mount API conversion
@ 2025-04-23 17:08 Eric Sandeen
  2025-04-23 17:08 ` [PATCH V3 1/7] f2fs: Add fs parameter specifications for mount options Eric Sandeen
                   ` (9 more replies)
  0 siblings, 10 replies; 58+ messages in thread
From: Eric Sandeen @ 2025-04-23 17:08 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: linux-fsdevel, jaegeuk, chao, lihongbo22

V3:
- Rebase onto git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
  dev branch
- Fix up some 0day robot warnings

This is a forward-port of Hongbo's original f2fs mount API conversion,
posted last August at 
https://lore.kernel.org/linux-f2fs-devel/20240814023912.3959299-1-lihongbo22@huawei.com/

I had been trying to approach this with a little less complexity,
but in the end I realized that Hongbo's approach (which follows
the ext4 approach) was a good one, and I was not making any progrss
myself. 😉

In addition to the forward-port, I have also fixed a couple bugs I found
during testing, and some improvements / style choices as well. Hongbo and
I have discussed most of this off-list already, so I'm presenting the
net result here.

This does pass my typical testing which does a large number of random
mounts/remounts with valid and invalid option sets, on f2fs filesystem
images with various features in the on-disk superblock. (I was not able
to test all of this completely, as some options or features require
hardware I dn't have.)

Thanks,
-Eric

(A recap of Hongbo's original cover letter is below, edited slightly for
this series:)

Since many filesystems have done the new mount API conversion,
we introduce the new mount API conversion in f2fs.

The series can be applied on top of the current mainline tree
and the work is based on the patches from Lukas Czerner (has
done this in ext4[1]). His patch give me a lot of ideas.

Here is a high level description of the patchset:

1. Prepare the f2fs mount parameters required by the new mount
API and use it for parsing, while still using the old API to
get mount options string. Split the parameter parsing and
validation of the parse_options helper into two separate
helpers.

  f2fs: Add fs parameter specifications for mount options
  f2fs: move the option parser into handle_mount_opt

2. Remove the use of sb/sbi structure of f2fs from all the
parsing code, because with the new mount API the parsing is
going to be done before we even get the super block. In this
part, we introduce f2fs_fs_context to hold the temporary
options when parsing. For the simple options check, it has
to be done during parsing by using f2fs_fs_context structure.
For the check which needs sb/sbi, we do this during super
block filling.

  f2fs: Allow sbi to be NULL in f2fs_printk
  f2fs: Add f2fs_fs_context to record the mount options
  f2fs: separate the options parsing and options checking

3. Switch the f2fs to use the new mount API for mount and
remount.

  f2fs: introduce fs_context_operation structure
  f2fs: switch to the new mount api

[1] https://lore.kernel.org/all/20211021114508.21407-1-lczerner@redhat.com/


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

end of thread, other threads:[~2025-07-11 16:29 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 17:08 [PATCH V3 0/7] f2fs: new mount API conversion Eric Sandeen
2025-04-23 17:08 ` [PATCH V3 1/7] f2fs: Add fs parameter specifications for mount options Eric Sandeen
2025-05-08  2:40   ` Hongbo Li
2025-05-08  5:24   ` Chao Yu
2025-07-11 16:30   ` [f2fs-dev] " patchwork-bot+f2fs
2025-04-23 17:08 ` [PATCH V3 2/7] f2fs: move the option parser into handle_mount_opt Eric Sandeen
2025-05-06 20:24   ` Jaegeuk Kim
2025-05-08  5:30   ` Chao Yu
2025-04-23 17:08 ` [PATCH V3 3/7] f2fs: Allow sbi to be NULL in f2fs_printk Eric Sandeen
2025-05-08  5:30   ` Chao Yu
2025-04-23 17:08 ` [PATCH V3 4/7] f2fs: Add f2fs_fs_context to record the mount options Eric Sandeen
2025-05-08  6:34   ` Chao Yu
2025-04-23 17:08 ` [PATCH V3 5/7] f2fs: separate the options parsing and options checking Eric Sandeen
2025-05-06 22:01   ` Jaegeuk Kim
2025-05-06 22:52     ` Eric Sandeen
2025-05-06 23:30       ` Jaegeuk Kim
2025-05-08  8:13   ` Chao Yu
2025-05-08 15:52     ` Eric Sandeen
2025-05-12  3:32       ` Chao Yu
2025-05-14  1:10         ` Hongbo Li
2025-05-14  1:03       ` Hongbo Li
2025-05-13  2:15   ` Jaegeuk Kim
2025-04-23 17:08 ` [PATCH V3 6/7] f2fs: introduce fs_context_operation structure Eric Sandeen
2025-05-08  8:14   ` Chao Yu
2025-04-23 17:08 ` [PATCH V3 7/7] f2fs: switch to the new mount api Eric Sandeen
2025-05-08  9:19   ` Chao Yu
2025-05-08 15:59     ` Eric Sandeen
2025-05-12  3:43       ` Chao Yu
2025-05-13  2:19         ` Eric Sandeen
2025-05-13  2:48           ` Chao Yu
2025-05-13 15:36             ` Jaegeuk Kim
2025-05-13  8:59   ` Chao Yu
2025-05-14  2:33     ` Hongbo Li
2025-05-14  4:03       ` Chao Yu
2025-05-14  6:15         ` Hongbo Li
2025-05-14 15:30           ` Jaegeuk Kim
2025-05-14 15:46             ` Eric Sandeen
2025-05-15  1:17             ` Hongbo Li
2025-05-16  2:01             ` Hongbo Li
2025-05-16 17:35               ` Jaegeuk Kim
2025-05-19  2:38                 ` Hongbo Li
2025-05-13 16:11   ` Jaegeuk Kim
2025-05-06  2:18 ` [PATCH V3 0/7] f2fs: new mount API conversion Eric Sandeen
2025-05-06 16:02   ` Jaegeuk Kim
2025-05-06 22:53     ` Eric Sandeen
2025-05-06 23:55 ` Ian Kent
2025-05-07  0:35 ` Jaegeuk Kim
2025-05-07  0:51   ` Eric Sandeen
2025-05-07  1:23     ` Jaegeuk Kim
2025-05-07  2:56       ` Eric Sandeen
2025-05-07  3:45         ` Eric Sandeen
2025-05-07 14:46           ` Jaegeuk Kim
2025-05-07 17:11             ` Eric Sandeen
2025-05-07 19:48               ` Jaegeuk Kim
2025-05-07 20:19                 ` Eric Sandeen
2025-05-07 20:28                   ` Jaegeuk Kim
2025-05-07 20:46                     ` Eric Sandeen
2025-05-07 21:36                       ` Jaegeuk Kim

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).