aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/inode.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/inode.h')
-rw-r--r--fs/ocfs2/inode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h
index a9ced009cb9c..aa84353d0d19 100644
--- a/fs/ocfs2/inode.h
+++ b/fs/ocfs2/inode.h
@@ -138,4 +138,11 @@ int ocfs2_aio_write(struct file *file, struct kiocb *req, struct iocb *iocb);
138 138
139void ocfs2_set_inode_flags(struct inode *inode); 139void ocfs2_set_inode_flags(struct inode *inode);
140 140
141static inline blkcnt_t ocfs2_inode_sector_count(struct inode *inode)
142{
143 int c_to_s_bits = OCFS2_SB(inode->i_sb)->s_clustersize_bits - 9;
144
145 return (blkcnt_t)(OCFS2_I(inode)->ip_clusters << c_to_s_bits);
146}
147
141#endif /* OCFS2_INODE_H */ 148#endif /* OCFS2_INODE_H */