Lines Matching refs:osb

64 	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);  in ocfs2_symlink_get_block()  local
99 buffer_cache_bh = sb_getblk(osb->sb, blkno); in ocfs2_symlink_get_block()
144 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_get_block() local
182 if (create && p_blkno == 0 && ocfs2_sparse_alloc(osb)) { in ocfs2_get_block()
194 if (!ocfs2_sparse_alloc(osb)) { in ocfs2_get_block()
656 static int ocfs2_is_overwrite(struct ocfs2_super *osb, in ocfs2_is_overwrite() argument
665 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); in ocfs2_is_overwrite()
679 static int ocfs2_direct_IO_zero_extend(struct ocfs2_super *osb, in ocfs2_direct_IO_zero_extend() argument
684 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, i_size_read(inode)); in ocfs2_direct_IO_zero_extend()
701 sector_t sector = ((u64)p_cpos << (osb->s_clustersize_bits - 9)) + in ocfs2_direct_IO_zero_extend()
702 (do_div(s, osb->s_clustersize) >> 9); in ocfs2_direct_IO_zero_extend()
704 ret = blkdev_issue_zeroout(osb->sb->s_bdev, sector, in ocfs2_direct_IO_zero_extend()
713 static int ocfs2_direct_IO_extend_no_holes(struct ocfs2_super *osb, in ocfs2_direct_IO_extend_no_holes() argument
718 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, i_size_read(inode)); in ocfs2_direct_IO_extend_no_holes()
728 offset_div = do_div(o, osb->s_clustersize); in ocfs2_direct_IO_extend_no_holes()
729 size_div = do_div(s, osb->s_clustersize); in ocfs2_direct_IO_extend_no_holes()
762 zero_start = ocfs2_clusters_to_bytes(osb->sb, p_cpos) + in ocfs2_direct_IO_extend_no_holes()
764 zero_len = ocfs2_clusters_to_bytes(osb->sb, num_clusters) - in ocfs2_direct_IO_extend_no_holes()
769 ret = blkdev_issue_zeroout(osb->sb->s_bdev, in ocfs2_direct_IO_extend_no_holes()
779 v_cpos += ocfs2_bytes_to_clusters(osb->sb, zero_len + size_div); in ocfs2_direct_IO_extend_no_holes()
800 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_direct_IO_write() local
803 journal_t *journal = osb->journal->j_journal; in ocfs2_direct_IO_write()
815 zero_len_head = do_div(o, 1 << osb->s_clustersize_bits); in ocfs2_direct_IO_write()
818 zero_len_tail = osb->s_clustersize - in ocfs2_direct_IO_write()
819 do_div(s, osb->s_clustersize); in ocfs2_direct_IO_write()
831 ret = ocfs2_add_inode_to_orphan(osb, inode); in ocfs2_direct_IO_write()
850 ret = ocfs2_direct_IO_zero_extend(osb, inode, offset, in ocfs2_direct_IO_write()
855 ret = ocfs2_direct_IO_extend_no_holes(osb, inode, in ocfs2_direct_IO_write()
865 is_overwrite = ocfs2_is_overwrite(osb, inode, offset); in ocfs2_direct_IO_write()
916 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); in ocfs2_direct_IO_write()
934 ret = blkdev_issue_zeroout(osb->sb->s_bdev, in ocfs2_direct_IO_write()
935 (u64)p_cpos << (osb->s_clustersize_bits - 9), in ocfs2_direct_IO_write()
956 tmp_ret = ocfs2_del_inode_from_orphan(osb, inode, di_bh, in ocfs2_direct_IO_write()
987 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_direct_IO() local
988 int full_coherency = !(osb->s_mount_opt & in ocfs2_direct_IO()
1013 static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, in ocfs2_figure_cluster_boundaries() argument
1020 if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits)) { in ocfs2_figure_cluster_boundaries()
1023 cpp = 1 << (PAGE_CACHE_SHIFT - osb->s_clustersize_bits); in ocfs2_figure_cluster_boundaries()
1026 cluster_start = cluster_start << osb->s_clustersize_bits; in ocfs2_figure_cluster_boundaries()
1028 cluster_end = cluster_start + osb->s_clustersize; in ocfs2_figure_cluster_boundaries()
1049 struct ocfs2_super *osb, u32 cpos, in ocfs2_clear_page_regions() argument
1055 ocfs2_figure_cluster_boundaries(osb, cpos, &cluster_start, &cluster_end); in ocfs2_clear_page_regions()
1316 struct ocfs2_super *osb, loff_t pos, in ocfs2_alloc_write_ctxt() argument
1326 wc->w_cpos = pos >> osb->s_clustersize_bits; in ocfs2_alloc_write_ctxt()
1328 cend = (pos + len - 1) >> osb->s_clustersize_bits; in ocfs2_alloc_write_ctxt()
1333 if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits)) in ocfs2_alloc_write_ctxt()
1690 struct ocfs2_super *osb = OCFS2_SB(mapping->host->i_sb); in ocfs2_write_cluster_by_desc() local
1700 cluster_off = pos & (osb->s_clustersize - 1); in ocfs2_write_cluster_by_desc()
1701 if ((cluster_off + local_len) > osb->s_clustersize) in ocfs2_write_cluster_by_desc()
1702 local_len = osb->s_clustersize - cluster_off; in ocfs2_write_cluster_by_desc()
1728 static void ocfs2_set_target_boundaries(struct ocfs2_super *osb, in ocfs2_set_target_boundaries() argument
1758 ocfs2_figure_cluster_boundaries(osb, in ocfs2_set_target_boundaries()
1765 ocfs2_figure_cluster_boundaries(osb, in ocfs2_set_target_boundaries()
1871 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_begin_inline() local
1876 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_write_begin_inline()
1885 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
1900 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
1912 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
2043 static int ocfs2_try_to_free_truncate_log(struct ocfs2_super *osb, in ocfs2_try_to_free_truncate_log() argument
2050 mutex_lock(&osb->osb_tl_inode->i_mutex); in ocfs2_try_to_free_truncate_log()
2051 truncated_clusters = osb->truncated_clusters; in ocfs2_try_to_free_truncate_log()
2052 mutex_unlock(&osb->osb_tl_inode->i_mutex); in ocfs2_try_to_free_truncate_log()
2061 ret = ocfs2_flush_truncate_log(osb); in ocfs2_try_to_free_truncate_log()
2067 if (jbd2_journal_start_commit(osb->journal->j_journal, &target)) { in ocfs2_try_to_free_truncate_log()
2068 jbd2_log_wait_commit(osb->journal->j_journal, target); in ocfs2_try_to_free_truncate_log()
2085 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_begin_nolock() local
2094 ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, di_bh); in ocfs2_write_begin_nolock()
2100 if (ocfs2_supports_inline_data(osb)) { in ocfs2_write_begin_nolock()
2113 if (ocfs2_sparse_alloc(osb)) in ocfs2_write_begin_nolock()
2196 ocfs2_set_target_boundaries(osb, wc, pos, len, cluster_of_pages); in ocfs2_write_begin_nolock()
2198 handle = ocfs2_start_trans(osb, credits); in ocfs2_write_begin_nolock()
2209 ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); in ocfs2_write_begin_nolock()
2264 ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); in ocfs2_write_begin_nolock()
2266 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_nolock()
2287 ret1 = ocfs2_try_to_free_truncate_log(osb, clusters_need); in ocfs2_write_begin_nolock()
2373 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_end_nolock() local
2450 ocfs2_commit_trans(osb, handle); in ocfs2_write_end_nolock()
2452 ocfs2_run_deallocs(osb, &wc->w_dealloc); in ocfs2_write_end_nolock()