GFS2: Fix remount argument parsing

Previous thread: GFS2: Remove unused field from glock by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:19 pm. (1 message)

Next thread: GFS2: Expose UUID via sysfs/uevent by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:20 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:19 pm

Gitweb:     http://git.kernel.org/linus/6f04c1c7fe9566d777fb7961391690866839e722
Commit:     6f04c1c7fe9566d777fb7961391690866839e722
Parent:     8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84
Author:     Steven Whitehouse <swhiteho@redhat.com>
AuthorDate: Tue Jan 6 11:52:25 2009 +0000
Committer:  Steven Whitehouse <steve@dolmen.chygwyn.com>
CommitDate: Tue Mar 24 11:21:10 2009 +0000

    GFS2: Fix remount argument parsing
    
    The following patch fixes an issue relating to remount and argument
    parsing. After this fix is applied, remount becomes atomic in that
    it either succeeds changing the mount to the new state, or it fails
    and leaves it in the old state. Previously it was possible for the
    parsing of options to fail part way though and for the fs to be left
    in a state where some of the new arguments had been applied, but some
    had not.
    
    Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
 fs/gfs2/mount.c      |  111 +++++++++-----------------------------------------
 fs/gfs2/mount.h      |   17 --------
 fs/gfs2/ops_fstype.c |   11 ++++-
 fs/gfs2/ops_super.c  |   41 ++++++++++++++-----
 fs/gfs2/super.h      |   26 ++++++-----
 5 files changed, 73 insertions(+), 133 deletions(-)

diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c
index 3cb0a44..3524ae8 100644
--- a/fs/gfs2/mount.c
+++ b/fs/gfs2/mount.c
@@ -17,7 +17,7 @@
 
 #include "gfs2.h"
 #include "incore.h"
-#include "mount.h"
+#include "super.h"
 #include "sys.h"
 #include "util.h"
 
@@ -77,101 +77,46 @@ static const match_table_t tokens = {
  * Return: errno
  */
 
-int gfs2_mount_args(struct gfs2_sbd *sdp, char *data_arg, int remount)
+int gfs2_mount_args(struct gfs2_sbd *sdp, struct gfs2_args *args, char *options)
 {
-	struct gfs2_args *args = &sdp->sd_args;
-	char *data = data_arg;
-	char *options, *o, *v;
-	int error = 0;
-
-	if (!remount) {
-		/*  Set some defaults  */
-		args->ar_quota = GFS2_QUOTA_DEFAULT;
-		args->ar_data = GFS2_DATA_DEFAULT;
-	}
+	char ...
Previous thread: GFS2: Remove unused field from glock by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:19 pm. (1 message)

Next thread: GFS2: Expose UUID via sysfs/uevent by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:20 pm. (1 message)