Linux NILFS development
 help / color / mirror / Atom feed
* [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off
@ 2009-11-11  9:04 Jiro SEKIBA
       [not found] ` <1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Jiro SEKIBA @ 2009-11-11  9:04 UTC (permalink / raw)
  To: users-JrjvKiOkagjYtjvyW6yDsg; +Cc: Jiro SEKIBA, Ryusuke Konishi

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] nilfs2: Using nobarrier option instead of barrier=off
       [not found] ` <1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
@ 2009-11-11  9:04   ` Jiro SEKIBA
  2009-11-11  9:04   ` [PATCH 2/2] nilfs2: cleanup unused match_bool function Jiro SEKIBA
  2009-11-11 12:03   ` [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off Ryusuke Konishi
  2 siblings, 0 replies; 5+ messages in thread
From: Jiro SEKIBA @ 2009-11-11  9:04 UTC (permalink / raw)
  To: users-JrjvKiOkagjYtjvyW6yDsg; +Cc: Jiro SEKIBA, Ryusuke Konishi

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

Signed-off-by: Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
---
 fs/nilfs2/super.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 644e667..02dcbb0 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -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)
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] nilfs2: cleanup unused match_bool function
       [not found] ` <1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
  2009-11-11  9:04   ` [PATCH 1/2] nilfs2: Using " Jiro SEKIBA
@ 2009-11-11  9:04   ` Jiro SEKIBA
  2009-11-11 12:03   ` [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off Ryusuke Konishi
  2 siblings, 0 replies; 5+ messages in thread
From: Jiro SEKIBA @ 2009-11-11  9:04 UTC (permalink / raw)
  To: users-JrjvKiOkagjYtjvyW6yDsg; +Cc: Jiro SEKIBA, Ryusuke Konishi

deleted unused match_bool() function.

Signed-off-by: Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
---
 fs/nilfs2/super.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 02dcbb0..b6837f4 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -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);
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off
       [not found] ` <1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
  2009-11-11  9:04   ` [PATCH 1/2] nilfs2: Using " Jiro SEKIBA
  2009-11-11  9:04   ` [PATCH 2/2] nilfs2: cleanup unused match_bool function Jiro SEKIBA
@ 2009-11-11 12:03   ` Ryusuke Konishi
       [not found]     ` <20091111.210352.22528384.ryusuke-sG5X7nlA6pw@public.gmane.org>
  2 siblings, 1 reply; 5+ messages in thread
From: Ryusuke Konishi @ 2009-11-11 12:03 UTC (permalink / raw)
  To: users-JrjvKiOkagjYtjvyW6yDsg, jir-hfpbi5WX9J54Eiagz67IpQ
  Cc: konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg

Hi!
On Wed, 11 Nov 2009 18:04:16 +0900, Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org> wrote:
> 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(-)

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off
       [not found]     ` <20091111.210352.22528384.ryusuke-sG5X7nlA6pw@public.gmane.org>
@ 2009-11-12  3:51       ` Jiro SEKIBA
  0 siblings, 0 replies; 5+ messages in thread
From: Jiro SEKIBA @ 2009-11-12  3:51 UTC (permalink / raw)
  To: users-JrjvKiOkagjYtjvyW6yDsg; +Cc: konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg

Hi, 

At Wed, 11 Nov 2009 21:03:52 +0900 (JST),
Ryusuke Konishi wrote:
> 
> Hi!
> On Wed, 11 Nov 2009 18:04:16 +0900, Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org> wrote:
> > 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(-)
> 
> 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.

Thank you for the review.

OK, I'll check and revise the document.

> Thanks,
> Ryusuke Konishi
> _______________________________________________
> users mailing list
> users-JrjvKiOkagjYtjvyW6yDsg@public.gmane.org
> https://www.nilfs.org/mailman/listinfo/users
> 
> 
> 

thanks,

regards,
-- 
Jiro SEKIBA <jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-12  3:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-11  9:04 [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off Jiro SEKIBA
     [not found] ` <1257930258-3106-1-git-send-email-jir-hfpbi5WX9J54Eiagz67IpQ@public.gmane.org>
2009-11-11  9:04   ` [PATCH 1/2] nilfs2: Using " Jiro SEKIBA
2009-11-11  9:04   ` [PATCH 2/2] nilfs2: cleanup unused match_bool function Jiro SEKIBA
2009-11-11 12:03   ` [PATCH 0/2] nilfs2: using nobarrier option instead of barrier=off Ryusuke Konishi
     [not found]     ` <20091111.210352.22528384.ryusuke-sG5X7nlA6pw@public.gmane.org>
2009-11-12  3:51       ` Jiro SEKIBA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox