Lines Matching refs:ruip
39 struct xfs_rui_log_item *ruip) in xfs_rui_item_free() argument
41 kvfree(ruip->rui_item.li_lv_shadow); in xfs_rui_item_free()
42 if (ruip->rui_format.rui_nextents > XFS_RUI_MAX_FAST_EXTENTS) in xfs_rui_item_free()
43 kfree(ruip); in xfs_rui_item_free()
45 kmem_cache_free(xfs_rui_cache, ruip); in xfs_rui_item_free()
57 struct xfs_rui_log_item *ruip) in xfs_rui_release() argument
59 ASSERT(atomic_read(&ruip->rui_refcount) > 0); in xfs_rui_release()
60 if (!atomic_dec_and_test(&ruip->rui_refcount)) in xfs_rui_release()
63 xfs_trans_ail_delete(&ruip->rui_item, 0); in xfs_rui_release()
64 xfs_rui_item_free(ruip); in xfs_rui_release()
73 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_size() local
76 *nbytes += xfs_rui_log_format_sizeof(ruip->rui_format.rui_nextents); in xfs_rui_item_size()
91 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_format() local
94 ASSERT(atomic_read(&ruip->rui_next_extent) == in xfs_rui_item_format()
95 ruip->rui_format.rui_nextents); in xfs_rui_item_format()
97 ruip->rui_format.rui_type = XFS_LI_RUI; in xfs_rui_item_format()
98 ruip->rui_format.rui_size = 1; in xfs_rui_item_format()
100 xlog_copy_iovec(lv, &vecp, XLOG_REG_TYPE_RUI_FORMAT, &ruip->rui_format, in xfs_rui_item_format()
101 xfs_rui_log_format_sizeof(ruip->rui_format.rui_nextents)); in xfs_rui_item_format()
117 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rui_item_unpin() local
119 xfs_rui_release(ruip); in xfs_rui_item_unpin()
143 struct xfs_rui_log_item *ruip; in xfs_rui_init() local
147 ruip = kzalloc(xfs_rui_log_item_sizeof(nextents), in xfs_rui_init()
150 ruip = kmem_cache_zalloc(xfs_rui_cache, in xfs_rui_init()
153 xfs_log_item_init(mp, &ruip->rui_item, XFS_LI_RUI, &xfs_rui_item_ops); in xfs_rui_init()
154 ruip->rui_format.rui_nextents = nextents; in xfs_rui_init()
155 ruip->rui_format.rui_id = (uintptr_t)(void *)ruip; in xfs_rui_init()
156 atomic_set(&ruip->rui_next_extent, 0); in xfs_rui_init()
157 atomic_set(&ruip->rui_refcount, 2); in xfs_rui_init()
159 return ruip; in xfs_rui_init()
253 struct xfs_rui_log_item *ruip, in xfs_rmap_update_log_item() argument
264 next_extent = atomic_inc_return(&ruip->rui_next_extent) - 1; in xfs_rmap_update_log_item()
265 ASSERT(next_extent < ruip->rui_format.rui_nextents); in xfs_rmap_update_log_item()
266 map = &ruip->rui_format.rui_extents[next_extent]; in xfs_rmap_update_log_item()
315 struct xfs_rui_log_item *ruip = xfs_rui_init(mp, count); in xfs_rmap_update_create_intent() local
323 xfs_rmap_update_log_item(tp, ruip, ri); in xfs_rmap_update_create_intent()
324 return &ruip->rui_item; in xfs_rmap_update_create_intent()
334 struct xfs_rui_log_item *ruip = RUI_ITEM(intent); in xfs_rmap_update_create_done() local
340 rudp->rud_ruip = ruip; in xfs_rmap_update_create_done()
341 rudp->rud_format.rud_rui_id = ruip->rui_format.rui_id; in xfs_rmap_update_create_done()
513 struct xfs_rui_log_item *ruip = RUI_ITEM(lip); in xfs_rmap_recover_work() local
524 for (i = 0; i < ruip->rui_format.rui_nextents; i++) { in xfs_rmap_recover_work()
526 &ruip->rui_format.rui_extents[i])) { in xfs_rmap_recover_work()
528 &ruip->rui_format, in xfs_rmap_recover_work()
529 sizeof(ruip->rui_format)); in xfs_rmap_recover_work()
533 xfs_rui_recover_work(mp, dfp, &ruip->rui_format.rui_extents[i]); in xfs_rmap_recover_work()
545 &ruip->rui_format, in xfs_rmap_recover_work()
546 sizeof(ruip->rui_format)); in xfs_rmap_recover_work()
564 struct xfs_rui_log_item *ruip; in xfs_rmap_relog_intent() local
571 ruip = xfs_rui_init(tp->t_mountp, count); in xfs_rmap_relog_intent()
572 memcpy(ruip->rui_format.rui_extents, map, count * sizeof(*map)); in xfs_rmap_relog_intent()
573 atomic_set(&ruip->rui_next_extent, count); in xfs_rmap_relog_intent()
575 return &ruip->rui_item; in xfs_rmap_relog_intent()
637 struct xfs_rui_log_item *ruip; in xlog_recover_rui_commit_pass2() local
656 ruip = xfs_rui_init(mp, rui_formatp->rui_nextents); in xlog_recover_rui_commit_pass2()
657 xfs_rui_copy_format(&ruip->rui_format, rui_formatp); in xlog_recover_rui_commit_pass2()
658 atomic_set(&ruip->rui_next_extent, rui_formatp->rui_nextents); in xlog_recover_rui_commit_pass2()
660 xlog_recover_intent_item(log, &ruip->rui_item, lsn, in xlog_recover_rui_commit_pass2()