diff options
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r-- | fs/gfs2/ops_super.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c index 458019569dcb..0677a8378560 100644 --- a/fs/gfs2/ops_super.c +++ b/fs/gfs2/ops_super.c | |||
@@ -436,8 +436,12 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) | |||
436 | { | 436 | { |
437 | struct gfs2_sbd *sdp = sb->s_fs_info; | 437 | struct gfs2_sbd *sdp = sb->s_fs_info; |
438 | struct gfs2_args args = sdp->sd_args; /* Default to current settings */ | 438 | struct gfs2_args args = sdp->sd_args; /* Default to current settings */ |
439 | struct gfs2_tune *gt = &sdp->sd_tune; | ||
439 | int error; | 440 | int error; |
440 | 441 | ||
442 | spin_lock(>->gt_spin); | ||
443 | args.ar_commit = gt->gt_log_flush_secs; | ||
444 | spin_unlock(>->gt_spin); | ||
441 | error = gfs2_mount_args(sdp, &args, data); | 445 | error = gfs2_mount_args(sdp, &args, data); |
442 | if (error) | 446 | if (error) |
443 | return error; | 447 | return error; |
@@ -473,6 +477,10 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) | |||
473 | sb->s_flags |= MS_POSIXACL; | 477 | sb->s_flags |= MS_POSIXACL; |
474 | else | 478 | else |
475 | sb->s_flags &= ~MS_POSIXACL; | 479 | sb->s_flags &= ~MS_POSIXACL; |
480 | spin_lock(>->gt_spin); | ||
481 | gt->gt_log_flush_secs = args.ar_commit; | ||
482 | spin_unlock(>->gt_spin); | ||
483 | |||
476 | return 0; | 484 | return 0; |
477 | } | 485 | } |
478 | 486 | ||
@@ -550,6 +558,7 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) | |||
550 | { | 558 | { |
551 | struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info; | 559 | struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info; |
552 | struct gfs2_args *args = &sdp->sd_args; | 560 | struct gfs2_args *args = &sdp->sd_args; |
561 | int lfsecs; | ||
553 | 562 | ||
554 | if (is_ancestor(mnt->mnt_root, sdp->sd_master_dir)) | 563 | if (is_ancestor(mnt->mnt_root, sdp->sd_master_dir)) |
555 | seq_printf(s, ",meta"); | 564 | seq_printf(s, ",meta"); |
@@ -610,7 +619,9 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) | |||
610 | } | 619 | } |
611 | if (args->ar_discard) | 620 | if (args->ar_discard) |
612 | seq_printf(s, ",discard"); | 621 | seq_printf(s, ",discard"); |
613 | 622 | lfsecs = sdp->sd_tune.gt_log_flush_secs; | |
623 | if (lfsecs != 60) | ||
624 | seq_printf(s, ",commit=%d", lfsecs); | ||
614 | return 0; | 625 | return 0; |
615 | } | 626 | } |
616 | 627 | ||