Lines Matching refs:efip
41 struct xfs_efi_log_item *efip) in xfs_efi_item_free() argument
43 kmem_free(efip->efi_item.li_lv_shadow); in xfs_efi_item_free()
44 if (efip->efi_format.efi_nextents > XFS_EFI_MAX_FAST_EXTENTS) in xfs_efi_item_free()
45 kmem_free(efip); in xfs_efi_item_free()
47 kmem_cache_free(xfs_efi_cache, efip); in xfs_efi_item_free()
59 struct xfs_efi_log_item *efip) in xfs_efi_release() argument
61 ASSERT(atomic_read(&efip->efi_refcount) > 0); in xfs_efi_release()
62 if (!atomic_dec_and_test(&efip->efi_refcount)) in xfs_efi_release()
65 xfs_trans_ail_delete(&efip->efi_item, 0); in xfs_efi_release()
66 xfs_efi_item_free(efip); in xfs_efi_release()
75 struct xfs_efi_log_item *efip = EFI_ITEM(lip); in xfs_efi_item_size() local
78 *nbytes += xfs_efi_log_format_sizeof(efip->efi_format.efi_nextents); in xfs_efi_item_size()
93 struct xfs_efi_log_item *efip = EFI_ITEM(lip); in xfs_efi_item_format() local
96 ASSERT(atomic_read(&efip->efi_next_extent) == in xfs_efi_item_format()
97 efip->efi_format.efi_nextents); in xfs_efi_item_format()
99 efip->efi_format.efi_type = XFS_LI_EFI; in xfs_efi_item_format()
100 efip->efi_format.efi_size = 1; in xfs_efi_item_format()
103 &efip->efi_format, in xfs_efi_item_format()
104 xfs_efi_log_format_sizeof(efip->efi_format.efi_nextents)); in xfs_efi_item_format()
121 struct xfs_efi_log_item *efip = EFI_ITEM(lip); in xfs_efi_item_unpin() local
122 xfs_efi_release(efip); in xfs_efi_item_unpin()
146 struct xfs_efi_log_item *efip; in xfs_efi_init() local
150 efip = kzalloc(xfs_efi_log_item_sizeof(nextents), in xfs_efi_init()
153 efip = kmem_cache_zalloc(xfs_efi_cache, in xfs_efi_init()
157 xfs_log_item_init(mp, &efip->efi_item, XFS_LI_EFI, &xfs_efi_item_ops); in xfs_efi_init()
158 efip->efi_format.efi_nextents = nextents; in xfs_efi_init()
159 efip->efi_format.efi_id = (uintptr_t)(void *)efip; in xfs_efi_init()
160 atomic_set(&efip->efi_next_extent, 0); in xfs_efi_init()
161 atomic_set(&efip->efi_refcount, 2); in xfs_efi_init()
163 return efip; in xfs_efi_init()
314 struct xfs_efi_log_item *efip, in xfs_trans_get_efd() argument
331 efdp->efd_efip = efip; in xfs_trans_get_efd()
333 efdp->efd_format.efd_efi_id = efip->efi_format.efi_id; in xfs_trans_get_efd()
354 struct xfs_efi_log_item *efip = efdp->efd_efip; in xfs_efd_from_efi() local
357 ASSERT(efip->efi_format.efi_nextents > 0); in xfs_efd_from_efi()
358 ASSERT(efdp->efd_next_extent < efip->efi_format.efi_nextents); in xfs_efd_from_efi()
360 for (i = 0; i < efip->efi_format.efi_nextents; i++) { in xfs_efd_from_efi()
362 efip->efi_format.efi_extents[i]; in xfs_efd_from_efi()
364 efdp->efd_next_extent = efip->efi_format.efi_nextents; in xfs_efd_from_efi()
450 struct xfs_efi_log_item *efip, in xfs_extent_free_log_item() argument
457 set_bit(XFS_LI_DIRTY, &efip->efi_item.li_flags); in xfs_extent_free_log_item()
464 next_extent = atomic_inc_return(&efip->efi_next_extent) - 1; in xfs_extent_free_log_item()
465 ASSERT(next_extent < efip->efi_format.efi_nextents); in xfs_extent_free_log_item()
466 extp = &efip->efi_format.efi_extents[next_extent]; in xfs_extent_free_log_item()
479 struct xfs_efi_log_item *efip = xfs_efi_init(mp, count); in xfs_extent_free_create_intent() local
484 xfs_trans_add_item(tp, &efip->efi_item); in xfs_extent_free_create_intent()
488 xfs_extent_free_log_item(tp, efip, xefi); in xfs_extent_free_create_intent()
489 return &efip->efi_item; in xfs_extent_free_create_intent()
664 struct xfs_efi_log_item *efip = EFI_ITEM(lip); in xfs_efi_item_recover() local
677 for (i = 0; i < efip->efi_format.efi_nextents; i++) { in xfs_efi_item_recover()
679 &efip->efi_format.efi_extents[i])) { in xfs_efi_item_recover()
681 &efip->efi_format, in xfs_efi_item_recover()
682 sizeof(efip->efi_format)); in xfs_efi_item_recover()
691 efdp = xfs_trans_get_efd(tp, efip, efip->efi_format.efi_nextents); in xfs_efi_item_recover()
693 for (i = 0; i < efip->efi_format.efi_nextents; i++) { in xfs_efi_item_recover()
700 extp = &efip->efi_format.efi_extents[i]; in xfs_efi_item_recover()
757 struct xfs_efi_log_item *efip; in xfs_efi_item_relog() local
770 efip = xfs_efi_init(tp->t_mountp, count); in xfs_efi_item_relog()
771 memcpy(efip->efi_format.efi_extents, extp, count * sizeof(*extp)); in xfs_efi_item_relog()
772 atomic_set(&efip->efi_next_extent, count); in xfs_efi_item_relog()
773 xfs_trans_add_item(tp, &efip->efi_item); in xfs_efi_item_relog()
774 set_bit(XFS_LI_DIRTY, &efip->efi_item.li_flags); in xfs_efi_item_relog()
775 return &efip->efi_item; in xfs_efi_item_relog()
804 struct xfs_efi_log_item *efip; in xlog_recover_efi_commit_pass2() local
816 efip = xfs_efi_init(mp, efi_formatp->efi_nextents); in xlog_recover_efi_commit_pass2()
817 error = xfs_efi_copy_format(&item->ri_buf[0], &efip->efi_format); in xlog_recover_efi_commit_pass2()
819 xfs_efi_item_free(efip); in xlog_recover_efi_commit_pass2()
822 atomic_set(&efip->efi_next_extent, efi_formatp->efi_nextents); in xlog_recover_efi_commit_pass2()
827 xfs_trans_ail_insert(log->l_ailp, &efip->efi_item, lsn); in xlog_recover_efi_commit_pass2()
828 xfs_efi_release(efip); in xlog_recover_efi_commit_pass2()