From: Bob Peterson <rpeterso@redhat.com> Date: Tue, 24 Feb 2009 00:13:17 -0500 Subject: [gfs2] make quota mount option consistent with gfs Message-id: 886409003.146101235452397976.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com O-Subject: [RHEL5.4 PATCH] bz 486168 - GFS2: Quota mount option inconsistent with common quota/noquota options Bugzilla: 486168 RH-Acked-by: Steven Whitehouse <swhiteho@redhat.com> Hi, This is a RHEL5.4 port of an upstream patch. In GFS, the mount syntax had "-o quota" and "-o noquota". In GFS2, the syntax was changed to "-o quota=on" and "-o quota=off" respectively. Users understandably complained that customers who were accustomed to GFS and/or used gfs2_convert to convert to GFS2 would have to change their mount options and/or fstab. This patch allows GFS2 to accept either format. It was tested on system roth-01. Regards, Bob Peterson Red Hat GFS Signed-off-by: Bob Peterson <rpeterso@redhat.com> -- diff --git a/fs/gfs2/mount.c b/fs/gfs2/mount.c index 9b53ca5..5af3e97 100644 --- a/fs/gfs2/mount.c +++ b/fs/gfs2/mount.c @@ -38,6 +38,8 @@ enum { Opt_quota_off, Opt_quota_account, Opt_quota_on, + Opt_quota, + Opt_noquota, Opt_suiddir, Opt_nosuiddir, Opt_data_writeback, @@ -63,6 +65,8 @@ static match_table_t tokens = { {Opt_quota_off, "quota=off"}, {Opt_quota_account, "quota=account"}, {Opt_quota_on, "quota=on"}, + {Opt_quota, "quota"}, + {Opt_noquota, "noquota"}, {Opt_suiddir, "suiddir"}, {Opt_nosuiddir, "nosuiddir"}, {Opt_data_writeback, "data=writeback"}, @@ -139,12 +143,14 @@ int gfs2_mount_args(struct gfs2_sbd *sdp, struct gfs2_args *args, char *options) args->ar_posix_acl = 0; break; case Opt_quota_off: + case Opt_noquota: args->ar_quota = GFS2_QUOTA_OFF; break; case Opt_quota_account: args->ar_quota = GFS2_QUOTA_ACCOUNT; break; case Opt_quota_on: + case Opt_quota: args->ar_quota = GFS2_QUOTA_ON; break; case Opt_suiddir: