aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 448aa8d11a97..888ba4ec42c6 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -1278,6 +1278,16 @@ static inline u16 ocfs2_extent_recs_per_eb(struct super_block *sb)
1278 return size / sizeof(struct ocfs2_extent_rec); 1278 return size / sizeof(struct ocfs2_extent_rec);
1279} 1279}
1280 1280
1281static inline u16 ocfs2_extent_recs_per_gd(struct super_block *sb)
1282{
1283 int size;
1284
1285 size = sb->s_blocksize -
1286 offsetof(struct ocfs2_group_desc, bg_list.l_recs);
1287
1288 return size / sizeof(struct ocfs2_extent_rec);
1289}
1290
1281static inline int ocfs2_dx_entries_per_leaf(struct super_block *sb) 1291static inline int ocfs2_dx_entries_per_leaf(struct super_block *sb)
1282{ 1292{
1283 int size; 1293 int size;
@@ -1430,6 +1440,16 @@ static inline int ocfs2_extent_recs_per_eb(int blocksize)
1430 return size / sizeof(struct ocfs2_extent_rec); 1440 return size / sizeof(struct ocfs2_extent_rec);
1431} 1441}
1432 1442
1443static inline int ocfs2_extent_recs_per_gd(int blocksize)
1444{
1445 int size;
1446
1447 size = blocksize -
1448 offsetof(struct ocfs2_group_desc, bg_list.l_recs);
1449
1450 return size / sizeof(struct ocfs2_extent_rec);
1451}
1452
1433static inline int ocfs2_local_alloc_size(int blocksize) 1453static inline int ocfs2_local_alloc_size(int blocksize)
1434{ 1454{
1435 int size; 1455 int size;