nilfs2: convert to use the new mount API
Subsystems (2)
Ryusuke Konishi
maintainerPATCH 1/1 nilfs2: convert to use the new mount API
From: Eric Sandeen <[email protected]>
Convert nilfs2 to use the new mount API.
---
Hi Andrew, please add this to the queue for the next merge window.
As the title suggests, this patch transforms the implementation around nilfs2 mount/remount, so I reviewed all changes and tested all mount options and nilfs2-specific mount patterns (such as simultaneous mounting of snapshots and current tree). This one passed those checks.
Thanks,
Ryusuke Konishi
fs/nilfs2/nilfs.h | 4 +- fs/nilfs2/super.c | 374 ++++++++++++++++++------------------------ fs/nilfs2/the_nilfs.c | 4 +- fs/nilfs2/the_nilfs.h | 6 +- 4 files changed, 164 insertions(+), 224 deletions(-)
fs/nilfs2/nilfs.h +2 -2
@@ -335,8 +335,8 @@ void __nilfs_error(struct super_block *sb, const char *function,extern struct nilfs_super_block *nilfs_read_super_block (struct super_block *,u64 ,int ,struct buffer_head **); -extern int nilfs_store_magic_and_option (struct super_block *, -struct nilfs_super_block *,char *); +extern int nilfs_store_magic (struct super_block *sb, +struct nilfs_super_block *sbp);extern int nilfs_check_feature_compatibility (struct super_block *,struct nilfs_super_block *); extern void nilfs_set_log_cursor(struct nilfs_super_block *,
fs/nilfs2/super.c +159 -215
527 lines not on this page · raw message
fs/nilfs2/the_nilfs.c +2 -2
@@ -668,7 +668,7 @@ static int nilfs_load_super_block(struct the_nilfs *nilfs,* Return Value: On success, 0 is returned. On error, a negative error * code is returned. */ -int init_nilfs (struct the_nilfs *nilfs,struct super_block *sb,char *data) +int init_nilfs (struct the_nilfs *nilfs,struct super_block *sb) {struct nilfs_super_block *sbp;int blocksize;
@@ -686,7 +686,7 @@ int init_nilfs(struct the_nilfs *nilfs, struct super_block *sb, char *data)if (err) goto out; - err =nilfs_store_magic_and_option (sb, sbp, data); + err =nilfs_store_magic (sb, sbp);if (err) goto failed_sbh;
fs/nilfs2/the_nilfs.h +1 -5
@@ -219,10 +219,6 @@ THE_NILFS_FNS(PURGING, purging)#define nilfs_set_opt (nilfs, opt) \ ((nilfs)->ns_mount_opt |= NILFS_MOUNT_##opt)#define nilfs_test_opt (nilfs, opt) ((nilfs)->ns_mount_opt & NILFS_MOUNT_##opt) -#define nilfs_write_opt (nilfs, mask, opt) \ - ((nilfs)->ns_mount_opt = \ - (((nilfs)->ns_mount_opt & ~NILFS_MOUNT_##mask) | \ - NILFS_MOUNT_##opt)) \/** * struct nilfs_root - nilfs root object
@@ -276,7 +272,7 @@ static inline int nilfs_sb_will_flip(struct the_nilfs *nilfs)void nilfs_set_last_segment (struct the_nilfs *,sector_t ,u64 ,__u64 );struct the_nilfs *alloc_nilfs (struct super_block *sb);void destroy_nilfs (struct the_nilfs *nilfs); -int init_nilfs (struct the_nilfs *nilfs,struct super_block *sb,char *data); +int init_nilfs (struct the_nilfs *nilfs,struct super_block *sb);int load_nilfs (struct the_nilfs *nilfs,struct super_block *sb);unsigned long nilfs_nrsvsegs (struct the_nilfs *nilfs,unsigned long nsegs);void nilfs_set_nsegments (struct the_nilfs *nilfs,unsigned long nsegs);
Signature · 1 line
2.34.1
Ryusuke Konishi
maintainerQuoted 12 lines · Ryusuke Konishi
From: Eric Sandeen <[email protected]>
Convert nilfs2 to use the new mount API.
[konishi.ryusuke: fixed missing SB_RDONLY flag repair in nilfs_reconfigure]Signed-off-by Eric Sandeen <[email protected]>Signed-off-by Ryusuke Konishi <[email protected]>---
Hi Andrew, please add this to the queue for the next merge window.
Quoted 7 lines
As the title suggests, this patch transforms the implementation around nilfs2 mount/remount, so I reviewed all changes and tested all mount options and nilfs2-specific mount patterns (such as simultaneous mounting of snapshots and current tree). This one passed those checks.
Thanks,
Ryusuke Konishi
Hi Andrew, please once drop this patch from the -mm tree.
I found one bug causing a kernel bug in additional fault injection testing, and also received issue reports from the 0-DAY CI Kernel Test Service.
I will fix these issues and resend you a revised patch.
Thanks,
Ryusuke Konishi