Skip to contentSkip to conversation

nilfs2: using nobarrier option instead of barrier=off

PATCH Superseded Jiro SEKIBA 2 participants 5 messages Nov 11, 2009 – Nov 12, 2009 2 messages not in the archive NILFS2 filesystem

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

A message that is not in the archive (sent off-list or not yet received): 1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org

#2 lore raw

PATCH 1/2 nilfs2: Using nobarrier option instead of barrier=off

Since 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
index 644e667..02dcbb0 100644
@@ -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
#3 lore raw

PATCH 2/2 nilfs2: cleanup unused match_bool function

In reply to a message not in the archive

deleted unused match_bool() function.

---
 fs/nilfs2/super.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
fs/nilfs2/super.c +0 -13
index 02dcbb0..b6837f4 100644
@@ -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
#4 lore raw
In reply to a message not in the archive

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

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.txt and 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]>