aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 7f625f2b1117..43dd42e313a1 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -252,7 +252,7 @@ struct ocfs2_super
252 struct ocfs2_journal *journal; 252 struct ocfs2_journal *journal;
253 unsigned long osb_commit_interval; 253 unsigned long osb_commit_interval;
254 254
255 int local_alloc_size; 255 unsigned int local_alloc_bits;
256 enum ocfs2_local_alloc_state local_alloc_state; 256 enum ocfs2_local_alloc_state local_alloc_state;
257 struct buffer_head *local_alloc_bh; 257 struct buffer_head *local_alloc_bh;
258 u64 la_last_gd; 258 u64 la_last_gd;
@@ -554,6 +554,14 @@ static inline unsigned int ocfs2_pages_per_cluster(struct super_block *sb)
554 return pages_per_cluster; 554 return pages_per_cluster;
555} 555}
556 556
557static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb,
558 unsigned int megs)
559{
560 BUILD_BUG_ON(OCFS2_MAX_CLUSTERSIZE > 1048576);
561
562 return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits);
563}
564
557static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb) 565static inline void ocfs2_init_inode_steal_slot(struct ocfs2_super *osb)
558{ 566{
559 spin_lock(&osb->osb_lock); 567 spin_lock(&osb->osb_lock);