Skip to content

f2fs: new mount API conversion

Eric Sandeen linux-f2fs-devel linux-fsdevel 2 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 51 repliesApplied 3/7
  2. v27 patches 8 repliesSuperseded 3 of 7 applied

Changes in v3 from the cover letter

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

Patches in v3 Applied · 3/7

#Subject and filesSizeRepliesApplied
1/7f2fs: Add fs parameter specifications for mount optionsfs/f2fs/super.c+122 -02 repliesApplied
2/7f2fs: move the option parser into handle_mount_optfs/f2fs/super.c+406 -6552 replies
3/7f2fs: Allow sbi to be NULL in f2fs_printkfs/f2fs/super.c+49 -411 replyApplied
4/7f2fs: Add f2fs_fs_context to record the mount optionsfs/f2fs/super.c+244 -1751 reply
5/7f2fs: separate the options parsing and options checkingfs/f2fs/super.c+510 -18311 replies
6/7f2fs: introduce fs_context_operation structurefs/f2fs/super.c+6 -21 replyApplied
7/7f2fs: switch to the new mount apifs/f2fs/super.c+62 -9417 replies

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIan KentHongbo LiChao Yu
SeriesR-b
1/7R-b R-b
2/7R-b
3/7R-b
4/7R-b
5/7
6/7R-b
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH V3 0/7] f2fs: new mount API conversion

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/[email protected]/

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/[email protected]/