Lines Matching refs:ruip

36 	struct xfs_rui_log_item	*ruip)  in xfs_rui_item_free()  argument
38 kmem_free(ruip->rui_item.li_lv_shadow); in xfs_rui_item_free()
39 if (ruip->rui_format.rui_nextents > XFS_RUI_MAX_FAST_EXTENTS) in xfs_rui_item_free()
40 kmem_free(ruip); in xfs_rui_item_free()
42 kmem_cache_free(xfs_rui_cache, ruip); in xfs_rui_item_free()
54 struct xfs_rui_log_item *ruip) in xfs_rui_release() argument
56 ASSERT(atomic_read(&ruip->rui_refcount) > 0); in xfs_rui_release()
57 if (!atomic_dec_and_test(&ruip->rui_refcount)) in xfs_rui_release()
60 xfs_trans_ail_delete(&ruip->rui_item, 0); in xfs_rui_release()
61 xfs_rui_item_free(ruip); in xfs_rui_release()
70 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_size() local
73 *nbytes += xfs_rui_log_format_sizeof(ruip->rui_format.rui_nextents); in xfs_rui_item_size()
88 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_format() local
91 ASSERT(atomic_read(&ruip->rui_next_extent) == in xfs_rui_item_format()
92 ruip->rui_format.rui_nextents); in xfs_rui_item_format()
94 ruip->rui_format.rui_type = XFS_LI_RUI; in xfs_rui_item_format()
95 ruip->rui_format.rui_size = 1; in xfs_rui_item_format()
97 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_RUI_FORMAT, &ruip->rui_format, in xfs_rui_item_format()
98 xfs_rui_log_format_sizeof(ruip->rui_format.rui_nextents)); in xfs_rui_item_format()
114 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_unpin() local
116 xfs_rui_release(ruip); in xfs_rui_item_unpin()
140 struct xfs_rui_log_item *ruip; in xfs_rui_init() local
144 ruip = kmem_zalloc(xfs_rui_log_item_sizeof(nextents), 0); in xfs_rui_init()
146 ruip = kmem_cache_zalloc(xfs_rui_cache, in xfs_rui_init()
149 xfs_log_item_init(mp, &ruip->rui_item, XFS_LI_RUI, &xfs_rui_item_ops); in xfs_rui_init()
150 ruip->rui_format.rui_nextents = nextents; in xfs_rui_init()
151 ruip->rui_format.rui_id = (uintptr_t)(void *)ruip; in xfs_rui_init()
152 atomic_set(&ruip->rui_next_extent, 0); in xfs_rui_init()
153 atomic_set(&ruip->rui_refcount, 2); in xfs_rui_init()
155 return ruip; in xfs_rui_init()
230 struct xfs_rui_log_item *ruip) in xfs_trans_get_rud() argument
237 rudp->rud_ruip = ruip; in xfs_trans_get_rud()
238 rudp->rud_format.rud_rui_id = ruip->rui_format.rui_id; in xfs_trans_get_rud()
344 struct xfs_rui_log_item *ruip, in xfs_rmap_update_log_item() argument
351 set_bit(XFS_LI_DIRTY, &ruip->rui_item.li_flags); in xfs_rmap_update_log_item()
358 next_extent = atomic_inc_return(&ruip->rui_next_extent) - 1; in xfs_rmap_update_log_item()
359 ASSERT(next_extent < ruip->rui_format.rui_nextents); in xfs_rmap_update_log_item()
360 map = &ruip->rui_format.rui_extents[next_extent]; in xfs_rmap_update_log_item()
377 struct xfs_rui_log_item *ruip = xfs_rui_init(mp, count); in xfs_rmap_update_create_intent() local
382 xfs_trans_add_item(tp, &ruip->rui_item); in xfs_rmap_update_create_intent()
386 xfs_rmap_update_log_item(tp, ruip, rmap); in xfs_rmap_update_create_intent()
387 return &ruip->rui_item; in xfs_rmap_update_create_intent()
495 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_recover() local
512 for (i = 0; i < ruip->rui_format.rui_nextents; i++) { in xfs_rui_item_recover()
514 &ruip->rui_format.rui_extents[i])) { in xfs_rui_item_recover()
516 &ruip->rui_format, in xfs_rui_item_recover()
517 sizeof(ruip->rui_format)); in xfs_rui_item_recover()
526 rudp = xfs_trans_get_rud(tp, ruip); in xfs_rui_item_recover()
528 for (i = 0; i < ruip->rui_format.rui_nextents; i++) { in xfs_rui_item_recover()
529 rmap = &ruip->rui_format.rui_extents[i]; in xfs_rui_item_recover()
561 &ruip->rui_format, in xfs_rui_item_recover()
562 sizeof(ruip->rui_format)); in xfs_rui_item_recover()
602 struct xfs_rui_log_item *ruip; in xfs_rui_item_relog() local
613 ruip = xfs_rui_init(tp->t_mountp, count); in xfs_rui_item_relog()
614 memcpy(ruip->rui_format.rui_extents, extp, count * sizeof(*extp)); in xfs_rui_item_relog()
615 atomic_set(&ruip->rui_next_extent, count); in xfs_rui_item_relog()
616 xfs_trans_add_item(tp, &ruip->rui_item); in xfs_rui_item_relog()
617 set_bit(XFS_LI_DIRTY, &ruip->rui_item.li_flags); in xfs_rui_item_relog()
618 return &ruip->rui_item; in xfs_rui_item_relog()
661 struct xfs_rui_log_item *ruip; in xlog_recover_rui_commit_pass2() local
680 ruip = xfs_rui_init(mp, rui_formatp->rui_nextents); in xlog_recover_rui_commit_pass2()
681 xfs_rui_copy_format(&ruip->rui_format, rui_formatp); in xlog_recover_rui_commit_pass2()
682 atomic_set(&ruip->rui_next_extent, rui_formatp->rui_nextents); in xlog_recover_rui_commit_pass2()
687 xfs_trans_ail_insert(log->l_ailp, &ruip->rui_item, lsn); in xlog_recover_rui_commit_pass2()
688 xfs_rui_release(ruip); in xlog_recover_rui_commit_pass2()