aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 70334d85aff1..3dee61ebd69a 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -637,7 +637,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
637 osb->s_atime_quantum = parsed_options.atime_quantum; 637 osb->s_atime_quantum = parsed_options.atime_quantum;
638 osb->preferred_slot = parsed_options.slot; 638 osb->preferred_slot = parsed_options.slot;
639 osb->osb_commit_interval = parsed_options.commit_interval; 639 osb->osb_commit_interval = parsed_options.commit_interval;
640 osb->local_alloc_size = parsed_options.localalloc_opt; 640 osb->local_alloc_bits = ocfs2_megabytes_to_clusters(sb, parsed_options.localalloc_opt);
641 641
642 status = ocfs2_verify_userspace_stack(osb, &parsed_options); 642 status = ocfs2_verify_userspace_stack(osb, &parsed_options);
643 if (status) 643 if (status)
@@ -938,6 +938,7 @@ static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
938{ 938{
939 struct ocfs2_super *osb = OCFS2_SB(mnt->mnt_sb); 939 struct ocfs2_super *osb = OCFS2_SB(mnt->mnt_sb);
940 unsigned long opts = osb->s_mount_opt; 940 unsigned long opts = osb->s_mount_opt;
941 unsigned int local_alloc_megs;
941 942
942 if (opts & OCFS2_MOUNT_HB_LOCAL) 943 if (opts & OCFS2_MOUNT_HB_LOCAL)
943 seq_printf(s, ",_netdev,heartbeat=local"); 944 seq_printf(s, ",_netdev,heartbeat=local");
@@ -970,8 +971,9 @@ static int ocfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
970 seq_printf(s, ",commit=%u", 971 seq_printf(s, ",commit=%u",
971 (unsigned) (osb->osb_commit_interval / HZ)); 972 (unsigned) (osb->osb_commit_interval / HZ));
972 973
973 if (osb->local_alloc_size != OCFS2_DEFAULT_LOCAL_ALLOC_SIZE) 974 local_alloc_megs = osb->local_alloc_bits >> (20 - osb->s_clustersize_bits);
974 seq_printf(s, ",localalloc=%d", osb->local_alloc_size); 975 if (local_alloc_megs != OCFS2_DEFAULT_LOCAL_ALLOC_SIZE)
976 seq_printf(s, ",localalloc=%d", local_alloc_megs);
975 977
976 if (opts & OCFS2_MOUNT_LOCALFLOCKS) 978 if (opts & OCFS2_MOUNT_LOCALFLOCKS)
977 seq_printf(s, ",localflocks,"); 979 seq_printf(s, ",localflocks,");