Lines Matching refs:cuip
39 struct xfs_cui_log_item *cuip) in xfs_cui_item_free() argument
41 kvfree(cuip->cui_item.li_lv_shadow); in xfs_cui_item_free()
42 if (cuip->cui_format.cui_nextents > XFS_CUI_MAX_FAST_EXTENTS) in xfs_cui_item_free()
43 kfree(cuip); in xfs_cui_item_free()
45 kmem_cache_free(xfs_cui_cache, cuip); in xfs_cui_item_free()
57 struct xfs_cui_log_item *cuip) in xfs_cui_release() argument
59 ASSERT(atomic_read(&cuip->cui_refcount) > 0); in xfs_cui_release()
60 if (!atomic_dec_and_test(&cuip->cui_refcount)) in xfs_cui_release()
63 xfs_trans_ail_delete(&cuip->cui_item, 0); in xfs_cui_release()
64 xfs_cui_item_free(cuip); in xfs_cui_release()
74 struct xfs_cui_log_item *cuip = CUI_ITEM(lip); in xfs_cui_item_size() local
77 *nbytes += xfs_cui_log_format_sizeof(cuip->cui_format.cui_nextents); in xfs_cui_item_size()
92 struct xfs_cui_log_item *cuip = CUI_ITEM(lip); in xfs_cui_item_format() local
95 ASSERT(atomic_read(&cuip->cui_next_extent) == in xfs_cui_item_format()
96 cuip->cui_format.cui_nextents); in xfs_cui_item_format()
98 cuip->cui_format.cui_type = XFS_LI_CUI; in xfs_cui_item_format()
99 cuip->cui_format.cui_size = 1; in xfs_cui_item_format()
101 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_CUI_FORMAT, &cuip->cui_format, in xfs_cui_item_format()
102 xfs_cui_log_format_sizeof(cuip->cui_format.cui_nextents)); in xfs_cui_item_format()
118 struct xfs_cui_log_item *cuip = CUI_ITEM(lip); in xfs_cui_item_unpin() local
120 xfs_cui_release(cuip); in xfs_cui_item_unpin()
144 struct xfs_cui_log_item *cuip; in xfs_cui_init() local
148 cuip = kzalloc(xfs_cui_log_item_sizeof(nextents), in xfs_cui_init()
151 cuip = kmem_cache_zalloc(xfs_cui_cache, in xfs_cui_init()
154 xfs_log_item_init(mp, &cuip->cui_item, XFS_LI_CUI, &xfs_cui_item_ops); in xfs_cui_init()
155 cuip->cui_format.cui_nextents = nextents; in xfs_cui_init()
156 cuip->cui_format.cui_id = (uintptr_t)(void *)cuip; in xfs_cui_init()
157 atomic_set(&cuip->cui_next_extent, 0); in xfs_cui_init()
158 atomic_set(&cuip->cui_refcount, 2); in xfs_cui_init()
160 return cuip; in xfs_cui_init()
254 struct xfs_cui_log_item *cuip, in xfs_refcount_update_log_item() argument
265 next_extent = atomic_inc_return(&cuip->cui_next_extent) - 1; in xfs_refcount_update_log_item()
266 ASSERT(next_extent < cuip->cui_format.cui_nextents); in xfs_refcount_update_log_item()
267 pmap = &cuip->cui_format.cui_extents[next_extent]; in xfs_refcount_update_log_item()
292 struct xfs_cui_log_item *cuip = xfs_cui_init(mp, count); in xfs_refcount_update_create_intent() local
300 xfs_refcount_update_log_item(tp, cuip, ri); in xfs_refcount_update_create_intent()
301 return &cuip->cui_item; in xfs_refcount_update_create_intent()
311 struct xfs_cui_log_item *cuip = CUI_ITEM(intent); in xfs_refcount_update_create_done() local
317 cudp->cud_cuip = cuip; in xfs_refcount_update_create_done()
318 cudp->cud_format.cud_cui_id = cuip->cui_format.cui_id; in xfs_refcount_update_create_done()
450 struct xfs_cui_log_item *cuip = CUI_ITEM(lip); in xfs_refcount_recover_work() local
461 for (i = 0; i < cuip->cui_format.cui_nextents; i++) { in xfs_refcount_recover_work()
463 &cuip->cui_format.cui_extents[i])) { in xfs_refcount_recover_work()
465 &cuip->cui_format, in xfs_refcount_recover_work()
466 sizeof(cuip->cui_format)); in xfs_refcount_recover_work()
470 xfs_cui_recover_work(mp, dfp, &cuip->cui_format.cui_extents[i]); in xfs_refcount_recover_work()
494 &cuip->cui_format, in xfs_refcount_recover_work()
495 sizeof(cuip->cui_format)); in xfs_refcount_recover_work()
513 struct xfs_cui_log_item *cuip; in xfs_refcount_relog_intent() local
520 cuip = xfs_cui_init(tp->t_mountp, count); in xfs_refcount_relog_intent()
521 memcpy(cuip->cui_format.cui_extents, pmap, count * sizeof(*pmap)); in xfs_refcount_relog_intent()
522 atomic_set(&cuip->cui_next_extent, count); in xfs_refcount_relog_intent()
524 return &cuip->cui_item; in xfs_refcount_relog_intent()
586 struct xfs_cui_log_item *cuip; in xlog_recover_cui_commit_pass2() local
605 cuip = xfs_cui_init(mp, cui_formatp->cui_nextents); in xlog_recover_cui_commit_pass2()
606 xfs_cui_copy_format(&cuip->cui_format, cui_formatp); in xlog_recover_cui_commit_pass2()
607 atomic_set(&cuip->cui_next_extent, cui_formatp->cui_nextents); in xlog_recover_cui_commit_pass2()
609 xlog_recover_intent_item(log, &cuip->cui_item, lsn, in xlog_recover_cui_commit_pass2()