nilfs2: using nobarrier option instead of barrier=off
cover nilfs2: using nobarrier option instead of barrier=off
Hi,
This is a series of patches to use nobarrier mount option instead of barrier=off, for most of fs using nofoobar style option.
First patch is the actual patch to modify the mount option.
Second patch is cleanup patch to remove unused match_bool() function as a result of modifying mount option.
fs/nilfs2/super.c | 28 +++++----------------------- 1 files changed, 5 insertions(+), 23 deletions(-)
PATCH 1/2 nilfs2: Using nobarrier option instead of barrier=off
In reply to a message not in the archiveSince most of fs using nofoobar style option,
modified barrier=off option as nobarrier
--- fs/nilfs2/super.c | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-)
fs/nilfs2/super.c +5 -10
@@ -490,7 +490,7 @@ static int nilfs_show_options(struct seq_file *seq, struct vfsmount *vfs)struct nilfs_sb_info *sbi =NILFS_SB (sb);if (!nilfs_test_opt (sbi,BARRIER )) -seq_printf (seq,",barrier=off" ); +seq_printf (seq,",nobarrier" );if (nilfs_test_opt (sbi,SNAPSHOT ))seq_printf (seq,",cp=%llu" , (unsigned long long int )sbi->s_snapshot_cno);
@@ -568,7 +568,7 @@ static const struct export_operations nilfs_export_ops = {enum { Opt_err_cont, Opt_err_panic, Opt_err_ro, - Opt_barrier, Opt_snapshot, Opt_order, + Opt_nobarrier, Opt_snapshot, Opt_order, Opt_err, };
@@ -576,7 +576,7 @@ static match_table_t tokens = { {Opt_err_cont, "errors=continue"}, {Opt_err_panic, "errors=panic"}, {Opt_err_ro, "errors=remount-ro"}, - {Opt_barrier, "barrier=%s"}, + {Opt_nobarrier, "nobarrier"}, {Opt_snapshot, "cp=%u"}, {Opt_order, "order=%s"}, {Opt_err, NULL}
@@ -612,13 +612,8 @@ static int parse_options(char *options, struct super_block *sb) token =match_token (p, tokens, args);switch (token) { -case Opt_barrier: -if (match_bool (&args[0 ], &option)) -return 0 ; -if (option) -nilfs_set_opt (sbi,BARRIER ); -else -nilfs_clear_opt (sbi,BARRIER ); +case Opt_nobarrier: +nilfs_clear_opt (sbi,BARRIER );break ;case Opt_order:if (strcmp (args[0 ].from,"relaxed" ) ==0 )
Signature · 1 line
1.5.6.5
PATCH 2/2 nilfs2: cleanup unused match_bool function
In reply to a message not in the archivedeleted unused match_bool() function.
--- fs/nilfs2/super.c | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-)
fs/nilfs2/super.c +0 -13
@@ -582,19 +582,6 @@ static match_table_t tokens = { {Opt_err, NULL} }; -static int match_bool (substring_t *s,int *result) -{ -int len = s->to - s->from; - -if (strncmp (s->from,"on" , len) ==0 ) - *result =1 ; -else if (strncmp (s->from,"off" , len) ==0 ) - *result =0 ; -else -return 1 ; -return 0 ; -} -static int parse_options (char *options,struct super_block *sb) {struct nilfs_sb_info *sbi =NILFS_SB (sb);
Signature · 1 line
1.5.6.5
Hi!
Quoted 5 lines · Jiro SEKIBA
Hi,
This is a series of patches to use nobarrier mount option instead of barrier=off, for most of fs using nofoobar style option.
Quoted 7 lines
First patch is the actual patch to modify the mount option.
Second patch is cleanup patch to remove unused
match_bool()function as a result of modifying mount option.fs/nilfs2/super.c | 28 +++++----------------------- 1 files changed, 5 insertions(+), 23 deletions(-)
Well, this change looks quite reasonable, and also helps to resolve the discordance between the old barrier option and standard linux options; it also matches the "-o norepair" which I posted recently.
Although the first patch changes user-interface, I believe the impact is limited because the barrier feature is enabled by default.
So, I'd like to apply your change unless someone dissents.
Sekiba-san, could you modify Documentation/filesystems/nilfs2.txt and include it in the first patch?
The doc file has description on mount options.
Thanks,
Ryusuke Konishi
Hi,
At Wed, 11 Nov 2009 21:03:52 +0900 (JST),
Quoted 23 lines · Ryusuke Konishi
Hi!
Quoted 5 lines · Jiro SEKIBA
Hi,
This is a series of patches to use nobarrier mount option instead of barrier=off, for most of fs using nofoobar style option.
Quoted 7 lines
First patch is the actual patch to modify the mount option.
Second patch is cleanup patch to remove unused
match_bool()function as a result of modifying mount option.fs/nilfs2/super.c | 28 +++++----------------------- 1 files changed, 5 insertions(+), 23 deletions(-)Well, this change looks quite reasonable, and also helps to resolve the discordance between the old barrier option and standard linux options; it also matches the "-o norepair" which I posted recently.
Although the first patch changes user-interface, I believe the impact is limited because the barrier feature is enabled by default.
Quoted 6 lines
So, I'd like to apply your change unless someone dissents.
Sekiba-san, could you modify
Documentation/filesystems/nilfs2.txtand include it in the first patch?The doc file has description on mount options.
Thank you for the review.
OK, I'll check and revise the document.
Quoted 9 lines
Thanks,
Ryusuke Konishi
_______________________________________________
users mailing list
[email protected]
https://www.nilfs.org/mailman/listinfo/users
thanks,
regards,
Signature · 1 line
Jiro SEKIBA <[email protected]>