Lines Matching refs:sb

304 	struct super_block *sb;  member
467 #define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info) argument
705 static inline unsigned long ino_from_blkno(struct super_block *sb, in ino_from_blkno() argument
711 static inline u64 ocfs2_clusters_to_blocks(struct super_block *sb, in ocfs2_clusters_to_blocks() argument
714 int c_to_b_bits = OCFS2_SB(sb)->s_clustersize_bits - in ocfs2_clusters_to_blocks()
715 sb->s_blocksize_bits; in ocfs2_clusters_to_blocks()
720 static inline u32 ocfs2_blocks_to_clusters(struct super_block *sb, in ocfs2_blocks_to_clusters() argument
723 int b_to_c_bits = OCFS2_SB(sb)->s_clustersize_bits - in ocfs2_blocks_to_clusters()
724 sb->s_blocksize_bits; in ocfs2_blocks_to_clusters()
729 static inline unsigned int ocfs2_clusters_for_bytes(struct super_block *sb, in ocfs2_clusters_for_bytes() argument
732 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_clusters_for_bytes()
735 bytes += OCFS2_SB(sb)->s_clustersize - 1; in ocfs2_clusters_for_bytes()
742 static inline unsigned int ocfs2_bytes_to_clusters(struct super_block *sb, in ocfs2_bytes_to_clusters() argument
745 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_bytes_to_clusters()
752 static inline u64 ocfs2_blocks_for_bytes(struct super_block *sb, in ocfs2_blocks_for_bytes() argument
755 bytes += sb->s_blocksize - 1; in ocfs2_blocks_for_bytes()
756 return bytes >> sb->s_blocksize_bits; in ocfs2_blocks_for_bytes()
759 static inline u64 ocfs2_clusters_to_bytes(struct super_block *sb, in ocfs2_clusters_to_bytes() argument
762 return (u64)clusters << OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_clusters_to_bytes()
765 static inline u64 ocfs2_block_to_cluster_start(struct super_block *sb, in ocfs2_block_to_cluster_start() argument
768 int bits = OCFS2_SB(sb)->s_clustersize_bits - sb->s_blocksize_bits; in ocfs2_block_to_cluster_start()
771 clusters = ocfs2_blocks_to_clusters(sb, blocks); in ocfs2_block_to_cluster_start()
775 static inline u64 ocfs2_align_bytes_to_clusters(struct super_block *sb, in ocfs2_align_bytes_to_clusters() argument
778 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_align_bytes_to_clusters()
781 clusters = ocfs2_clusters_for_bytes(sb, bytes); in ocfs2_align_bytes_to_clusters()
785 static inline u64 ocfs2_align_bytes_to_blocks(struct super_block *sb, in ocfs2_align_bytes_to_blocks() argument
790 blocks = ocfs2_blocks_for_bytes(sb, bytes); in ocfs2_align_bytes_to_blocks()
791 return blocks << sb->s_blocksize_bits; in ocfs2_align_bytes_to_blocks()
799 static inline unsigned int ocfs2_page_index_to_clusters(struct super_block *sb, in ocfs2_page_index_to_clusters() argument
803 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_page_index_to_clusters()
816 static inline pgoff_t ocfs2_align_clusters_to_page_index(struct super_block *sb, in ocfs2_align_clusters_to_page_index() argument
819 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_align_clusters_to_page_index()
831 static inline unsigned int ocfs2_pages_per_cluster(struct super_block *sb) in ocfs2_pages_per_cluster() argument
833 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_pages_per_cluster()
842 static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb, in ocfs2_megabytes_to_clusters() argument
847 return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); in ocfs2_megabytes_to_clusters()
850 static inline unsigned int ocfs2_clusters_to_megabytes(struct super_block *sb, in ocfs2_clusters_to_megabytes() argument
853 return clusters >> (20 - OCFS2_SB(sb)->s_clustersize_bits); in ocfs2_clusters_to_megabytes()