]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ocfs2/ocfs2.h
ocfs2: clean up localalloc mount option size parsing
[net-next-2.6.git] / fs / ocfs2 / ocfs2.h
index 9552560df6cd1ceedec23bbdc925adcca6770557..e98c954cf961cb7f025c877d2e6a1b19796c1b22 100644 (file)
@@ -768,6 +768,12 @@ static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb,
        return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits);
 }
 
+static inline unsigned int ocfs2_clusters_to_megabytes(struct super_block *sb,
+                                                      unsigned int clusters)
+{
+       return clusters >> (20 - OCFS2_SB(sb)->s_clustersize_bits);
+}
+
 static inline void _ocfs2_set_bit(unsigned int bit, unsigned long *bitmap)
 {
        ext2_set_bit(bit, bitmap);