linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH]: remount - don't error on xattr and acl options
@ 2013-09-24 22:41 Kelly Anderson
  2013-09-27  8:35 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Kelly Anderson @ 2013-09-24 22:41 UTC (permalink / raw)
  To: linux-f2fs-devel, jaegeuk.kim

[-- Attachment #1: Type: text/plain, Size: 2025 bytes --]

Hi,

The current f2fs code errors if the xattr or acl options are passed when 
remounting.  This is important in a typical scenario where f2fs is mounted
as a "ro" root file-system by the boot loader and then the init process wants
to remount it "rw" with the "remount,rw" option.

The attached patch fixes the problem.

Included here for review.

--- ./fs/f2fs/super.c.orig	2013-09-22 19:17:07.713293098 -0600
+++ ./fs/f2fs/super.c	2013-09-22 19:27:59.604265911 -0600
@@ -43,7 +43,9 @@ enum {
 	Opt_disable_roll_forward,
 	Opt_discard,
 	Opt_noheap,
+	Opt_user_xattr,
 	Opt_nouser_xattr,
+	Opt_acl,
 	Opt_noacl,
 	Opt_active_logs,
 	Opt_disable_ext_identify,
@@ -56,7 +58,9 @@ static match_table_t f2fs_tokens = {
 	{Opt_disable_roll_forward, "disable_roll_forward"},
 	{Opt_discard, "discard"},
 	{Opt_noheap, "no_heap"},
+	{Opt_user_xattr, "user_xattr"},
 	{Opt_nouser_xattr, "nouser_xattr"},
+	{Opt_acl, "acl"},
 	{Opt_noacl, "noacl"},
 	{Opt_active_logs, "active_logs=%u"},
 	{Opt_disable_ext_identify, "disable_ext_identify"},
@@ -237,6 +241,9 @@ static int parse_options(struct super_bl
 			set_opt(sbi, NOHEAP);
 			break;
 #ifdef CONFIG_F2FS_FS_XATTR
+		case Opt_user_xattr:
+			set_opt(sbi, XATTR_USER);
+			break;
 		case Opt_nouser_xattr:
 			clear_opt(sbi, XATTR_USER);
 			break;
@@ -244,6 +251,10 @@ static int parse_options(struct super_bl
 			set_opt(sbi, INLINE_XATTR);
 			break;
 #else
+		case Opt_user_xattr:
+			f2fs_msg(sb, KERN_INFO,
+				"user_xattr options not supported");
+			break;
 		case Opt_nouser_xattr:
 			f2fs_msg(sb, KERN_INFO,
 				"nouser_xattr options not supported");
@@ -254,10 +265,16 @@ static int parse_options(struct super_bl
 			break;
 #endif
 #ifdef CONFIG_F2FS_FS_POSIX_ACL
+		case Opt_acl:
+			set_opt(sbi, POSIX_ACL);
+			break;
 		case Opt_noacl:
 			clear_opt(sbi, POSIX_ACL);
 			break;
 #else
+		case Opt_acl:
+			f2fs_msg(sb, KERN_INFO, "acl options not supported");
+			break;
 		case Opt_noacl:
 			f2fs_msg(sb, KERN_INFO, "noacl options not supported");
 			break;

[-- Attachment #2: Kernel-3.12+-f2fs-dont-error-on-xattr-and-acl-options.patch --]
[-- Type: text/x-patch, Size: 1677 bytes --]

--- ./fs/f2fs/super.c.orig	2013-09-22 19:17:07.713293098 -0600
+++ ./fs/f2fs/super.c	2013-09-22 19:27:59.604265911 -0600
@@ -43,7 +43,9 @@ enum {
 	Opt_disable_roll_forward,
 	Opt_discard,
 	Opt_noheap,
+	Opt_user_xattr,
 	Opt_nouser_xattr,
+	Opt_acl,
 	Opt_noacl,
 	Opt_active_logs,
 	Opt_disable_ext_identify,
@@ -56,7 +58,9 @@ static match_table_t f2fs_tokens = {
 	{Opt_disable_roll_forward, "disable_roll_forward"},
 	{Opt_discard, "discard"},
 	{Opt_noheap, "no_heap"},
+	{Opt_user_xattr, "user_xattr"},
 	{Opt_nouser_xattr, "nouser_xattr"},
+	{Opt_acl, "acl"},
 	{Opt_noacl, "noacl"},
 	{Opt_active_logs, "active_logs=%u"},
 	{Opt_disable_ext_identify, "disable_ext_identify"},
@@ -237,6 +241,9 @@ static int parse_options(struct super_bl
 			set_opt(sbi, NOHEAP);
 			break;
 #ifdef CONFIG_F2FS_FS_XATTR
+		case Opt_user_xattr:
+			set_opt(sbi, XATTR_USER);
+			break;
 		case Opt_nouser_xattr:
 			clear_opt(sbi, XATTR_USER);
 			break;
@@ -244,6 +251,10 @@ static int parse_options(struct super_bl
 			set_opt(sbi, INLINE_XATTR);
 			break;
 #else
+		case Opt_user_xattr:
+			f2fs_msg(sb, KERN_INFO,
+				"user_xattr options not supported");
+			break;
 		case Opt_nouser_xattr:
 			f2fs_msg(sb, KERN_INFO,
 				"nouser_xattr options not supported");
@@ -254,10 +265,16 @@ static int parse_options(struct super_bl
 			break;
 #endif
 #ifdef CONFIG_F2FS_FS_POSIX_ACL
+		case Opt_acl:
+			set_opt(sbi, POSIX_ACL);
+			break;
 		case Opt_noacl:
 			clear_opt(sbi, POSIX_ACL);
 			break;
 #else
+		case Opt_acl:
+			f2fs_msg(sb, KERN_INFO, "acl options not supported");
+			break;
 		case Opt_noacl:
 			f2fs_msg(sb, KERN_INFO, "noacl options not supported");
 			break;

[-- Attachment #3: Type: text/plain, Size: 416 bytes --]

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk

[-- Attachment #4: Type: text/plain, Size: 179 bytes --]

_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [PATCH]: remount - don't error on xattr and acl options
  2013-09-24 22:41 [PATCH]: remount - don't error on xattr and acl options Kelly Anderson
@ 2013-09-27  8:35 ` Jaegeuk Kim
  0 siblings, 0 replies; 2+ messages in thread
From: Jaegeuk Kim @ 2013-09-27  8:35 UTC (permalink / raw)
  To: Kelly Anderson; +Cc: linux-f2fs-devel

Hi,

It is reasonable, so could you send a formal patch?
Thanks,

2013-09-24 (화), 16:41 -0600, Kelly Anderson:
> Hi,
> 
> The current f2fs code errors if the xattr or acl options are passed when 
> remounting.  This is important in a typical scenario where f2fs is mounted
> as a "ro" root file-system by the boot loader and then the init process wants
> to remount it "rw" with the "remount,rw" option.
> 
> The attached patch fixes the problem.
> 
> Included here for review.
> 
> --- ./fs/f2fs/super.c.orig	2013-09-22 19:17:07.713293098 -0600
> +++ ./fs/f2fs/super.c	2013-09-22 19:27:59.604265911 -0600
> @@ -43,7 +43,9 @@ enum {
>  	Opt_disable_roll_forward,
>  	Opt_discard,
>  	Opt_noheap,
> +	Opt_user_xattr,
>  	Opt_nouser_xattr,
> +	Opt_acl,
>  	Opt_noacl,
>  	Opt_active_logs,
>  	Opt_disable_ext_identify,
> @@ -56,7 +58,9 @@ static match_table_t f2fs_tokens = {
>  	{Opt_disable_roll_forward, "disable_roll_forward"},
>  	{Opt_discard, "discard"},
>  	{Opt_noheap, "no_heap"},
> +	{Opt_user_xattr, "user_xattr"},
>  	{Opt_nouser_xattr, "nouser_xattr"},
> +	{Opt_acl, "acl"},
>  	{Opt_noacl, "noacl"},
>  	{Opt_active_logs, "active_logs=%u"},
>  	{Opt_disable_ext_identify, "disable_ext_identify"},
> @@ -237,6 +241,9 @@ static int parse_options(struct super_bl
>  			set_opt(sbi, NOHEAP);
>  			break;
>  #ifdef CONFIG_F2FS_FS_XATTR
> +		case Opt_user_xattr:
> +			set_opt(sbi, XATTR_USER);
> +			break;
>  		case Opt_nouser_xattr:
>  			clear_opt(sbi, XATTR_USER);
>  			break;
> @@ -244,6 +251,10 @@ static int parse_options(struct super_bl
>  			set_opt(sbi, INLINE_XATTR);
>  			break;
>  #else
> +		case Opt_user_xattr:
> +			f2fs_msg(sb, KERN_INFO,
> +				"user_xattr options not supported");
> +			break;
>  		case Opt_nouser_xattr:
>  			f2fs_msg(sb, KERN_INFO,
>  				"nouser_xattr options not supported");
> @@ -254,10 +265,16 @@ static int parse_options(struct super_bl
>  			break;
>  #endif
>  #ifdef CONFIG_F2FS_FS_POSIX_ACL
> +		case Opt_acl:
> +			set_opt(sbi, POSIX_ACL);
> +			break;
>  		case Opt_noacl:
>  			clear_opt(sbi, POSIX_ACL);
>  			break;
>  #else
> +		case Opt_acl:
> +			f2fs_msg(sb, KERN_INFO, "acl options not supported");
> +			break;
>  		case Opt_noacl:
>  			f2fs_msg(sb, KERN_INFO, "noacl options not supported");
>  			break;

-- 
Jaegeuk Kim
Samsung



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, other threads:[~2013-09-27  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-24 22:41 [PATCH]: remount - don't error on xattr and acl options Kelly Anderson
2013-09-27  8:35 ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).