Lines Matching refs:handle
85 static int ocfs2_block_group_fill(handle_t *handle,
110 handle_t *handle,
116 static int ocfs2_relink_block_group(handle_t *handle,
373 static int ocfs2_block_group_fill(handle_t *handle, in ocfs2_block_group_fill() argument
395 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_fill()
423 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_fill()
451 ocfs2_block_group_alloc_contig(struct ocfs2_super *osb, handle_t *handle, in ocfs2_block_group_alloc_contig() argument
462 status = ocfs2_claim_clusters(handle, ac, in ocfs2_block_group_alloc_contig()
484 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_contig()
496 handle_t *handle, in ocfs2_block_group_claim_bits() argument
504 status = ocfs2_claim_clusters(handle, ac, min_bits, in ocfs2_block_group_claim_bits()
515 static int ocfs2_block_group_grow_discontig(handle_t *handle, in ocfs2_block_group_grow_discontig() argument
532 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_grow_discontig()
545 status = ocfs2_block_group_claim_bits(osb, handle, ac, in ocfs2_block_group_grow_discontig()
571 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_block_group_grow_discontig()
577 static void ocfs2_bg_alloc_cleanup(handle_t *handle, in ocfs2_bg_alloc_cleanup() argument
594 ret = ocfs2_free_clusters(handle, cluster_ac->ac_inode, in ocfs2_bg_alloc_cleanup()
608 ocfs2_block_group_alloc_discontig(handle_t *handle, in ocfs2_block_group_alloc_discontig() argument
626 status = ocfs2_extend_trans(handle, in ocfs2_block_group_alloc_discontig()
642 status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits, in ocfs2_block_group_alloc_discontig()
664 status = ocfs2_block_group_fill(handle, alloc_inode, bg_bh, in ocfs2_block_group_alloc_discontig()
671 status = ocfs2_block_group_grow_discontig(handle, alloc_inode, in ocfs2_block_group_alloc_discontig()
678 ocfs2_bg_alloc_cleanup(handle, ac, alloc_inode, bg_bh); in ocfs2_block_group_alloc_discontig()
696 handle_t *handle = NULL; in ocfs2_block_group_alloc() local
715 handle = ocfs2_start_trans(osb, credits); in ocfs2_block_group_alloc()
716 if (IS_ERR(handle)) { in ocfs2_block_group_alloc()
717 status = PTR_ERR(handle); in ocfs2_block_group_alloc()
718 handle = NULL; in ocfs2_block_group_alloc()
729 bg_bh = ocfs2_block_group_alloc_contig(osb, handle, alloc_inode, in ocfs2_block_group_alloc()
732 bg_bh = ocfs2_block_group_alloc_discontig(handle, in ocfs2_block_group_alloc()
744 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in ocfs2_block_group_alloc()
765 ocfs2_journal_dirty(handle, bh); in ocfs2_block_group_alloc()
774 ocfs2_update_inode_fsync_trans(handle, alloc_inode, 0); in ocfs2_block_group_alloc()
783 if (handle) in ocfs2_block_group_alloc()
784 ocfs2_commit_trans(osb, handle); in ocfs2_block_group_alloc()
1341 int ocfs2_block_group_set_bits(handle_t *handle, in ocfs2_block_group_set_bits() argument
1362 status = ocfs2_journal_access_gd(handle, in ocfs2_block_group_set_bits()
1383 ocfs2_journal_dirty(handle, group_bh); in ocfs2_block_group_set_bits()
1408 static int ocfs2_relink_block_group(handle_t *handle, in ocfs2_relink_block_group() argument
1436 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1443 ocfs2_journal_dirty(handle, prev_bg_bh); in ocfs2_relink_block_group()
1445 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1451 ocfs2_journal_dirty(handle, bg_bh); in ocfs2_relink_block_group()
1453 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in ocfs2_relink_block_group()
1459 ocfs2_journal_dirty(handle, fe_bh); in ocfs2_relink_block_group()
1585 handle_t *handle, in ocfs2_alloc_dinode_update_counts() argument
1595 ret = ocfs2_journal_access_di(handle, INODE_CACHE(inode), di_bh, in ocfs2_alloc_dinode_update_counts()
1605 ocfs2_journal_dirty(handle, di_bh); in ocfs2_alloc_dinode_update_counts()
1676 handle_t *handle, in ocfs2_search_one_group() argument
1716 ret = ocfs2_alloc_dinode_update_counts(alloc_inode, handle, ac->ac_bh, in ocfs2_search_one_group()
1724 ret = ocfs2_block_group_set_bits(handle, alloc_inode, gd, group_bh, in ocfs2_search_one_group()
1743 handle_t *handle, in ocfs2_search_chain() argument
1834 status = ocfs2_relink_block_group(handle, alloc_inode, in ocfs2_search_chain()
1846 status = ocfs2_alloc_dinode_update_counts(alloc_inode, handle, in ocfs2_search_chain()
1854 status = ocfs2_block_group_set_bits(handle, in ocfs2_search_chain()
1884 handle_t *handle, in ocfs2_claim_suballoc_bits() argument
1924 status = ocfs2_search_one_group(ac, handle, bits_wanted, in ocfs2_claim_suballoc_bits()
1939 status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, in ocfs2_claim_suballoc_bits()
1964 status = ocfs2_search_chain(ac, handle, bits_wanted, min_bits, in ocfs2_claim_suballoc_bits()
1993 int ocfs2_claim_metadata(handle_t *handle, in ocfs2_claim_metadata() argument
2009 handle, in ocfs2_claim_metadata()
2072 handle_t *handle = NULL; in ocfs2_find_new_inode_loc() local
2093 handle = ocfs2_start_trans(OCFS2_SB(dir->i_sb), OCFS2_SUBALLOC_ALLOC); in ocfs2_find_new_inode_loc()
2094 if (IS_ERR(handle)) { in ocfs2_find_new_inode_loc()
2095 ret = PTR_ERR(handle); in ocfs2_find_new_inode_loc()
2096 handle = NULL; in ocfs2_find_new_inode_loc()
2108 ret = ocfs2_claim_suballoc_bits(ac, handle, 1, 1, res); in ocfs2_find_new_inode_loc()
2116 ocfs2_update_inode_fsync_trans(handle, dir, 0); in ocfs2_find_new_inode_loc()
2118 if (handle) in ocfs2_find_new_inode_loc()
2119 ocfs2_commit_trans(OCFS2_SB(dir->i_sb), handle); in ocfs2_find_new_inode_loc()
2127 int ocfs2_claim_new_inode_at_loc(handle_t *handle, in ocfs2_claim_new_inode_at_loc() argument
2159 ret = ocfs2_alloc_dinode_update_counts(ac->ac_inode, handle, in ocfs2_claim_new_inode_at_loc()
2167 ret = ocfs2_block_group_set_bits(handle, in ocfs2_claim_new_inode_at_loc()
2198 int ocfs2_claim_new_inode(handle_t *handle, in ocfs2_claim_new_inode() argument
2217 handle, in ocfs2_claim_new_inode()
2302 int __ocfs2_claim_clusters(handle_t *handle, in __ocfs2_claim_clusters() argument
2323 handle, in __ocfs2_claim_clusters()
2345 handle, in __ocfs2_claim_clusters()
2373 int ocfs2_claim_clusters(handle_t *handle, in ocfs2_claim_clusters() argument
2381 return __ocfs2_claim_clusters(handle, ac, min_clusters, in ocfs2_claim_clusters()
2385 static int ocfs2_block_group_clear_bits(handle_t *handle, in ocfs2_block_group_clear_bits() argument
2405 status = ocfs2_journal_access_gd(handle, INODE_CACHE(alloc_inode), in ocfs2_block_group_clear_bits()
2443 ocfs2_journal_dirty(handle, group_bh); in ocfs2_block_group_clear_bits()
2451 static int _ocfs2_free_suballoc_bits(handle_t *handle, in _ocfs2_free_suballoc_bits() argument
2490 status = ocfs2_block_group_clear_bits(handle, alloc_inode, in _ocfs2_free_suballoc_bits()
2498 status = ocfs2_journal_access_di(handle, INODE_CACHE(alloc_inode), in _ocfs2_free_suballoc_bits()
2502 ocfs2_block_group_set_bits(handle, alloc_inode, group, group_bh, in _ocfs2_free_suballoc_bits()
2511 ocfs2_journal_dirty(handle, alloc_bh); in _ocfs2_free_suballoc_bits()
2521 int ocfs2_free_suballoc_bits(handle_t *handle, in ocfs2_free_suballoc_bits() argument
2528 return _ocfs2_free_suballoc_bits(handle, alloc_inode, alloc_bh, in ocfs2_free_suballoc_bits()
2532 int ocfs2_free_dinode(handle_t *handle, in ocfs2_free_dinode() argument
2543 return ocfs2_free_suballoc_bits(handle, inode_alloc_inode, in ocfs2_free_dinode()
2547 static int _ocfs2_free_clusters(handle_t *handle, in _ocfs2_free_clusters() argument
2576 status = _ocfs2_free_suballoc_bits(handle, bitmap_inode, bitmap_bh, in _ocfs2_free_clusters()
2593 int ocfs2_free_clusters(handle_t *handle, in ocfs2_free_clusters() argument
2599 return _ocfs2_free_clusters(handle, bitmap_inode, bitmap_bh, in ocfs2_free_clusters()
2608 int ocfs2_release_clusters(handle_t *handle, in ocfs2_release_clusters() argument
2614 return _ocfs2_free_clusters(handle, bitmap_inode, bitmap_bh, in ocfs2_release_clusters()