Skip to contentSkip to conversation

nilfs2: using nobarrier option instead of barrier=off

PATCH In review Jiro SEKIBA 2 participants 4 messages Nov 12, 2009 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 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 and revise the document according to the change.

Second patch is cleanup patch to remove unused match_bool() function as a result of modifying mount option.

 Documentation/filesystems/nilfs2.txt |    3 +--
 fs/nilfs2/super.c                    |   28 +++++-----------------------
 2 files changed, 6 insertions(+), 25 deletions(-)

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

#2 lore raw

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

Since most of fs using nofoobar style option,
modified barrier=off option as nobarrier.

---
 Documentation/filesystems/nilfs2.txt |    3 +--
 fs/nilfs2/super.c                    |   15 +++++----------
 2 files changed, 6 insertions(+), 12 deletions(-)
Documentation/filesystems/nilfs2.txt +1 -2
index 01539f4..68c65c0 100644
@@ -49,8 +49,7 @@ Mount options
 NILFS2 supports the following mount options:
 (*) == default
 
-barrier=on(*)		This enables/disables barriers. barrier=off disables
-			it, barrier=on enables it.
+nobarrier		Disables barriers.
 errors=continue(*)	Keep going on a filesystem error.
 errors=remount-ro	Remount the filesystem read-only on an error.
 errors=panic		Panic and halt the machine if an error occurs.
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 v2 2/2 nilfs2: cleanup unused match_bool function

In reply to a message not in the archive

match_bool function is not used anymore.

---
 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
Quoted 8 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.

First patch is the actual patch to modify the mount option and revise the document according to the change.

Quoted 6 lines

Second patch is cleanup patch to remove unused match_bool() function as a result of modifying mount option.

 Documentation/filesystems/nilfs2.txt |    3 +--
 fs/nilfs2/super.c                    |   28 +++++-----------------------
 2 files changed, 6 insertions(+), 25 deletions(-)

Looks fine to me.

Thanks,
Ryusuke Konishi