Lines Matching refs:sb
306 struct super_block *sb; member
469 #define OCFS2_SB(sb) ((struct ocfs2_super *)(sb)->s_fs_info) argument
707 static inline unsigned long ino_from_blkno(struct super_block *sb, in ino_from_blkno() argument
713 static inline u64 ocfs2_clusters_to_blocks(struct super_block *sb, in ocfs2_clusters_to_blocks() argument
716 int c_to_b_bits = OCFS2_SB(sb)->s_clustersize_bits - in ocfs2_clusters_to_blocks()
717 sb->s_blocksize_bits; in ocfs2_clusters_to_blocks()
722 static inline u32 ocfs2_clusters_for_blocks(struct super_block *sb, in ocfs2_clusters_for_blocks() argument
725 int b_to_c_bits = OCFS2_SB(sb)->s_clustersize_bits - in ocfs2_clusters_for_blocks()
726 sb->s_blocksize_bits; in ocfs2_clusters_for_blocks()
732 static inline u32 ocfs2_blocks_to_clusters(struct super_block *sb, in ocfs2_blocks_to_clusters() argument
735 int b_to_c_bits = OCFS2_SB(sb)->s_clustersize_bits - in ocfs2_blocks_to_clusters()
736 sb->s_blocksize_bits; in ocfs2_blocks_to_clusters()
741 static inline unsigned int ocfs2_clusters_for_bytes(struct super_block *sb, in ocfs2_clusters_for_bytes() argument
744 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_clusters_for_bytes()
747 bytes += OCFS2_SB(sb)->s_clustersize - 1; in ocfs2_clusters_for_bytes()
754 static inline unsigned int ocfs2_bytes_to_clusters(struct super_block *sb, in ocfs2_bytes_to_clusters() argument
757 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_bytes_to_clusters()
764 static inline u64 ocfs2_blocks_for_bytes(struct super_block *sb, in ocfs2_blocks_for_bytes() argument
767 bytes += sb->s_blocksize - 1; in ocfs2_blocks_for_bytes()
768 return bytes >> sb->s_blocksize_bits; in ocfs2_blocks_for_bytes()
771 static inline u64 ocfs2_clusters_to_bytes(struct super_block *sb, in ocfs2_clusters_to_bytes() argument
774 return (u64)clusters << OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_clusters_to_bytes()
777 static inline u64 ocfs2_block_to_cluster_start(struct super_block *sb, in ocfs2_block_to_cluster_start() argument
780 int bits = OCFS2_SB(sb)->s_clustersize_bits - sb->s_blocksize_bits; in ocfs2_block_to_cluster_start()
783 clusters = ocfs2_blocks_to_clusters(sb, blocks); in ocfs2_block_to_cluster_start()
787 static inline u64 ocfs2_align_bytes_to_clusters(struct super_block *sb, in ocfs2_align_bytes_to_clusters() argument
790 int cl_bits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_align_bytes_to_clusters()
793 clusters = ocfs2_clusters_for_bytes(sb, bytes); in ocfs2_align_bytes_to_clusters()
797 static inline u64 ocfs2_align_bytes_to_blocks(struct super_block *sb, in ocfs2_align_bytes_to_blocks() argument
802 blocks = ocfs2_blocks_for_bytes(sb, bytes); in ocfs2_align_bytes_to_blocks()
803 return blocks << sb->s_blocksize_bits; in ocfs2_align_bytes_to_blocks()
811 static inline unsigned int ocfs2_page_index_to_clusters(struct super_block *sb, in ocfs2_page_index_to_clusters() argument
815 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_page_index_to_clusters()
828 static inline pgoff_t ocfs2_align_clusters_to_page_index(struct super_block *sb, in ocfs2_align_clusters_to_page_index() argument
831 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_align_clusters_to_page_index()
843 static inline unsigned int ocfs2_pages_per_cluster(struct super_block *sb) in ocfs2_pages_per_cluster() argument
845 unsigned int cbits = OCFS2_SB(sb)->s_clustersize_bits; in ocfs2_pages_per_cluster()
854 static inline unsigned int ocfs2_megabytes_to_clusters(struct super_block *sb, in ocfs2_megabytes_to_clusters() argument
859 return megs << (20 - OCFS2_SB(sb)->s_clustersize_bits); in ocfs2_megabytes_to_clusters()
862 static inline unsigned int ocfs2_clusters_to_megabytes(struct super_block *sb, in ocfs2_clusters_to_megabytes() argument
865 return clusters >> (20 - OCFS2_SB(sb)->s_clustersize_bits); in ocfs2_clusters_to_megabytes()