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()
644 static int ocfs2_is_overwrite(struct ocfs2_super *osb, in ocfs2_is_overwrite() argument
653 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); in ocfs2_is_overwrite()
667 static int ocfs2_direct_IO_zero_extend(struct ocfs2_super *osb, in ocfs2_direct_IO_zero_extend() argument
672 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, i_size_read(inode)); in ocfs2_direct_IO_zero_extend()
689 sector_t sector = ((u64)p_cpos << (osb->s_clustersize_bits - 9)) + in ocfs2_direct_IO_zero_extend()
690 (do_div(s, osb->s_clustersize) >> 9); in ocfs2_direct_IO_zero_extend()
692 ret = blkdev_issue_zeroout(osb->sb->s_bdev, sector, in ocfs2_direct_IO_zero_extend()
701 static int ocfs2_direct_IO_extend_no_holes(struct ocfs2_super *osb, in ocfs2_direct_IO_extend_no_holes() argument
706 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, i_size_read(inode)); in ocfs2_direct_IO_extend_no_holes()
716 offset_div = do_div(o, osb->s_clustersize); in ocfs2_direct_IO_extend_no_holes()
717 size_div = do_div(s, osb->s_clustersize); in ocfs2_direct_IO_extend_no_holes()
750 zero_start = ocfs2_clusters_to_bytes(osb->sb, p_cpos) + in ocfs2_direct_IO_extend_no_holes()
752 zero_len = ocfs2_clusters_to_bytes(osb->sb, num_clusters) - in ocfs2_direct_IO_extend_no_holes()
757 ret = blkdev_issue_zeroout(osb->sb->s_bdev, in ocfs2_direct_IO_extend_no_holes()
767 v_cpos += ocfs2_bytes_to_clusters(osb->sb, zero_len + size_div); in ocfs2_direct_IO_extend_no_holes()
788 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_direct_IO_write() local
791 journal_t *journal = osb->journal->j_journal; in ocfs2_direct_IO_write()
803 zero_len_head = do_div(o, 1 << osb->s_clustersize_bits); in ocfs2_direct_IO_write()
806 zero_len_tail = osb->s_clustersize - in ocfs2_direct_IO_write()
807 do_div(s, osb->s_clustersize); in ocfs2_direct_IO_write()
819 ret = ocfs2_add_inode_to_orphan(osb, inode); in ocfs2_direct_IO_write()
837 ret = ocfs2_direct_IO_zero_extend(osb, inode, offset, in ocfs2_direct_IO_write()
840 ret = ocfs2_direct_IO_extend_no_holes(osb, inode, in ocfs2_direct_IO_write()
848 is_overwrite = ocfs2_is_overwrite(osb, inode, offset); in ocfs2_direct_IO_write()
895 u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); in ocfs2_direct_IO_write()
913 ret = blkdev_issue_zeroout(osb->sb->s_bdev, in ocfs2_direct_IO_write()
914 (u64)p_cpos << (osb->s_clustersize_bits - 9), in ocfs2_direct_IO_write()
928 tmp_ret = ocfs2_del_inode_from_orphan(osb, inode, in ocfs2_direct_IO_write()
953 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_direct_IO() local
954 int full_coherency = !(osb->s_mount_opt & in ocfs2_direct_IO()
979 static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb, in ocfs2_figure_cluster_boundaries() argument
986 if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits)) { in ocfs2_figure_cluster_boundaries()
989 cpp = 1 << (PAGE_CACHE_SHIFT - osb->s_clustersize_bits); in ocfs2_figure_cluster_boundaries()
992 cluster_start = cluster_start << osb->s_clustersize_bits; in ocfs2_figure_cluster_boundaries()
994 cluster_end = cluster_start + osb->s_clustersize; in ocfs2_figure_cluster_boundaries()
1015 struct ocfs2_super *osb, u32 cpos, in ocfs2_clear_page_regions() argument
1021 ocfs2_figure_cluster_boundaries(osb, cpos, &cluster_start, &cluster_end); in ocfs2_clear_page_regions()
1282 struct ocfs2_super *osb, loff_t pos, in ocfs2_alloc_write_ctxt() argument
1292 wc->w_cpos = pos >> osb->s_clustersize_bits; in ocfs2_alloc_write_ctxt()
1294 cend = (pos + len - 1) >> osb->s_clustersize_bits; in ocfs2_alloc_write_ctxt()
1299 if (unlikely(PAGE_CACHE_SHIFT > osb->s_clustersize_bits)) in ocfs2_alloc_write_ctxt()
1656 struct ocfs2_super *osb = OCFS2_SB(mapping->host->i_sb); in ocfs2_write_cluster_by_desc() local
1666 cluster_off = pos & (osb->s_clustersize - 1); in ocfs2_write_cluster_by_desc()
1667 if ((cluster_off + local_len) > osb->s_clustersize) in ocfs2_write_cluster_by_desc()
1668 local_len = osb->s_clustersize - cluster_off; in ocfs2_write_cluster_by_desc()
1694 static void ocfs2_set_target_boundaries(struct ocfs2_super *osb, in ocfs2_set_target_boundaries() argument
1724 ocfs2_figure_cluster_boundaries(osb, in ocfs2_set_target_boundaries()
1731 ocfs2_figure_cluster_boundaries(osb, in ocfs2_set_target_boundaries()
1837 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_begin_inline() local
1842 handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); in ocfs2_write_begin_inline()
1851 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
1866 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
1878 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_inline()
2009 static int ocfs2_try_to_free_truncate_log(struct ocfs2_super *osb, in ocfs2_try_to_free_truncate_log() argument
2016 mutex_lock(&osb->osb_tl_inode->i_mutex); in ocfs2_try_to_free_truncate_log()
2017 truncated_clusters = osb->truncated_clusters; in ocfs2_try_to_free_truncate_log()
2018 mutex_unlock(&osb->osb_tl_inode->i_mutex); in ocfs2_try_to_free_truncate_log()
2027 ret = ocfs2_flush_truncate_log(osb); in ocfs2_try_to_free_truncate_log()
2033 if (jbd2_journal_start_commit(osb->journal->j_journal, &target)) { in ocfs2_try_to_free_truncate_log()
2034 jbd2_log_wait_commit(osb->journal->j_journal, target); in ocfs2_try_to_free_truncate_log()
2051 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_begin_nolock() local
2060 ret = ocfs2_alloc_write_ctxt(&wc, osb, pos, len, di_bh); in ocfs2_write_begin_nolock()
2066 if (ocfs2_supports_inline_data(osb)) { in ocfs2_write_begin_nolock()
2079 if (ocfs2_sparse_alloc(osb)) in ocfs2_write_begin_nolock()
2162 ocfs2_set_target_boundaries(osb, wc, pos, len, cluster_of_pages); in ocfs2_write_begin_nolock()
2164 handle = ocfs2_start_trans(osb, credits); in ocfs2_write_begin_nolock()
2175 ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); in ocfs2_write_begin_nolock()
2233 ocfs2_clusters_to_bytes(osb->sb, clusters_to_alloc)); in ocfs2_write_begin_nolock()
2235 ocfs2_commit_trans(osb, handle); in ocfs2_write_begin_nolock()
2256 ret1 = ocfs2_try_to_free_truncate_log(osb, clusters_need); in ocfs2_write_begin_nolock()
2342 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); in ocfs2_write_end_nolock() local
2410 ocfs2_commit_trans(osb, handle); in ocfs2_write_end_nolock()
2412 ocfs2_run_deallocs(osb, &wc->w_dealloc); in ocfs2_write_end_nolock()