diff options
author | Mark Fasheh <mfasheh@suse.com> | 2008-07-28 17:55:20 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2008-10-13 16:57:57 -0400 |
commit | ebcee4b5c9136096f64ee6f691a013d7c0a4bc34 (patch) | |
tree | cb28c9135559a8f5aaf4c61b9d39f9c4ce733b55 /fs/ocfs2/super.c | |
parent | 53da4939f349d4edd283b043219221ca5b78e4d4 (diff) |
ocfs2: Track local alloc bits internally
Do this instead of tracking absolute local alloc size. This avoids
needless re-calculatiion of bits from bytes in localalloc.c. Additionally,
the value is now in a more natural unit for internal file system bitmap
work.
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r-- | fs/ocfs2/super.c | 8 |
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,"); |