aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index b1dcfab36465..5e4b31441a9e 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -73,6 +73,8 @@ enum {
73 Opt_statfs_quantum, 73 Opt_statfs_quantum,
74 Opt_statfs_percent, 74 Opt_statfs_percent,
75 Opt_quota_quantum, 75 Opt_quota_quantum,
76 Opt_barrier,
77 Opt_nobarrier,
76 Opt_error, 78 Opt_error,
77}; 79};
78 80
@@ -107,6 +109,8 @@ static const match_table_t tokens = {
107 {Opt_statfs_quantum, "statfs_quantum=%d"}, 109 {Opt_statfs_quantum, "statfs_quantum=%d"},
108 {Opt_statfs_percent, "statfs_percent=%d"}, 110 {Opt_statfs_percent, "statfs_percent=%d"},
109 {Opt_quota_quantum, "quota_quantum=%d"}, 111 {Opt_quota_quantum, "quota_quantum=%d"},
112 {Opt_barrier, "barrier"},
113 {Opt_nobarrier, "nobarrier"},
110 {Opt_error, NULL} 114 {Opt_error, NULL}
111}; 115};
112 116
@@ -253,6 +257,12 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
253 } 257 }
254 args->ar_errors = GFS2_ERRORS_PANIC; 258 args->ar_errors = GFS2_ERRORS_PANIC;
255 break; 259 break;
260 case Opt_barrier:
261 args->ar_nobarrier = 0;
262 break;
263 case Opt_nobarrier:
264 args->ar_nobarrier = 1;
265 break;
256 case Opt_error: 266 case Opt_error:
257 default: 267 default:
258 printk(KERN_WARNING "GFS2: invalid mount option: %s\n", o); 268 printk(KERN_WARNING "GFS2: invalid mount option: %s\n", o);
@@ -1143,6 +1153,10 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
1143 sb->s_flags |= MS_POSIXACL; 1153 sb->s_flags |= MS_POSIXACL;
1144 else 1154 else
1145 sb->s_flags &= ~MS_POSIXACL; 1155 sb->s_flags &= ~MS_POSIXACL;
1156 if (sdp->sd_args.ar_nobarrier)
1157 set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
1158 else
1159 clear_bit(SDF_NOBARRIERS, &sdp->sd_flags);
1146 spin_lock(&gt->gt_spin); 1160 spin_lock(&gt->gt_spin);
1147 gt->gt_log_flush_secs = args.ar_commit; 1161 gt->gt_log_flush_secs = args.ar_commit;
1148 gt->gt_quota_quantum = args.ar_quota_quantum; 1162 gt->gt_quota_quantum = args.ar_quota_quantum;