Lines Matching refs:licp
55 xfs_log_item_chunk_t *licp; in xfs_trans_add_item() local
63 licp = (xfs_log_item_chunk_t*) in xfs_trans_add_item()
65 ASSERT(licp != NULL); in xfs_trans_add_item()
70 XFS_LIC_INIT(licp); in xfs_trans_add_item()
71 XFS_LIC_CLAIM(licp, 0); in xfs_trans_add_item()
72 licp->lic_unused = 1; in xfs_trans_add_item()
73 XFS_LIC_INIT_SLOT(licp, 0); in xfs_trans_add_item()
74 lidp = XFS_LIC_SLOT(licp, 0); in xfs_trans_add_item()
79 licp->lic_next = tp->t_items.lic_next; in xfs_trans_add_item()
80 tp->t_items.lic_next = licp; in xfs_trans_add_item()
103 licp = &tp->t_items; in xfs_trans_add_item()
104 while (licp != NULL) { in xfs_trans_add_item()
105 if (XFS_LIC_VACANCY(licp)) { in xfs_trans_add_item()
106 if (licp->lic_unused <= XFS_LIC_MAX_SLOT) { in xfs_trans_add_item()
107 i = licp->lic_unused; in xfs_trans_add_item()
108 ASSERT(XFS_LIC_ISFREE(licp, i)); in xfs_trans_add_item()
112 if (XFS_LIC_ISFREE(licp, i)) in xfs_trans_add_item()
118 licp = licp->lic_next; in xfs_trans_add_item()
120 ASSERT(licp != NULL); in xfs_trans_add_item()
125 XFS_LIC_CLAIM(licp, i); in xfs_trans_add_item()
126 if (licp->lic_unused <= i) { in xfs_trans_add_item()
127 licp->lic_unused = i + 1; in xfs_trans_add_item()
128 XFS_LIC_INIT_SLOT(licp, i); in xfs_trans_add_item()
130 lidp = XFS_LIC_SLOT(licp, i); in xfs_trans_add_item()
150 xfs_log_item_chunk_t *licp; in xfs_trans_free_item() local
154 licp = XFS_LIC_DESC_TO_CHUNK(lidp); in xfs_trans_free_item()
155 XFS_LIC_RELSE(licp, slot); in xfs_trans_free_item()
171 if (XFS_LIC_ARE_ALL_FREE(licp) && (licp != &(tp->t_items))) { in xfs_trans_free_item()
173 while (*licpp != licp) { in xfs_trans_free_item()
177 *licpp = licp->lic_next; in xfs_trans_free_item()
178 kmem_free(licp, sizeof(xfs_log_item_chunk_t)); in xfs_trans_free_item()
217 xfs_log_item_chunk_t *licp; in xfs_trans_first_item() local
220 licp = &tp->t_items; in xfs_trans_first_item()
224 if (XFS_LIC_ARE_ALL_FREE(licp)) { in xfs_trans_first_item()
225 licp = licp->lic_next; in xfs_trans_first_item()
231 ASSERT(!XFS_LIC_ARE_ALL_FREE(licp)); in xfs_trans_first_item()
232 for (i = 0; i < licp->lic_unused; i++) { in xfs_trans_first_item()
233 if (XFS_LIC_ISFREE(licp, i)) { in xfs_trans_first_item()
237 return (XFS_LIC_SLOT(licp, i)); in xfs_trans_first_item()
256 xfs_log_item_chunk_t *licp; in xfs_trans_next_item() local
259 licp = XFS_LIC_DESC_TO_CHUNK(lidp); in xfs_trans_next_item()
265 for (i = (int)XFS_LIC_DESC_TO_SLOT(lidp) + 1; i < licp->lic_unused; i++) { in xfs_trans_next_item()
266 if (XFS_LIC_ISFREE(licp, i)) { in xfs_trans_next_item()
270 return (XFS_LIC_SLOT(licp, i)); in xfs_trans_next_item()
278 if (licp->lic_next == NULL) { in xfs_trans_next_item()
282 licp = licp->lic_next; in xfs_trans_next_item()
283 ASSERT(!XFS_LIC_ARE_ALL_FREE(licp)); in xfs_trans_next_item()
284 for (i = 0; i < licp->lic_unused; i++) { in xfs_trans_next_item()
285 if (XFS_LIC_ISFREE(licp, i)) { in xfs_trans_next_item()
289 return (XFS_LIC_SLOT(licp, i)); in xfs_trans_next_item()
308 xfs_log_item_chunk_t *licp; in xfs_trans_free_items() local
313 licp = &tp->t_items; in xfs_trans_free_items()
317 if (!XFS_LIC_ARE_ALL_FREE(licp)) { in xfs_trans_free_items()
318 (void) xfs_trans_unlock_chunk(licp, 1, abort, NULLCOMMITLSN); in xfs_trans_free_items()
319 XFS_LIC_ALL_FREE(licp); in xfs_trans_free_items()
320 licp->lic_unused = 0; in xfs_trans_free_items()
322 licp = licp->lic_next; in xfs_trans_free_items()
327 while (licp != NULL) { in xfs_trans_free_items()
328 ASSERT(!XFS_LIC_ARE_ALL_FREE(licp)); in xfs_trans_free_items()
329 (void) xfs_trans_unlock_chunk(licp, 1, abort, NULLCOMMITLSN); in xfs_trans_free_items()
330 next_licp = licp->lic_next; in xfs_trans_free_items()
331 kmem_free(licp, sizeof(xfs_log_item_chunk_t)); in xfs_trans_free_items()
332 licp = next_licp; in xfs_trans_free_items()
353 xfs_log_item_chunk_t *licp; in xfs_trans_unlock_items() local
359 licp = &tp->t_items; in xfs_trans_unlock_items()
364 if (!XFS_LIC_ARE_ALL_FREE(licp)) { in xfs_trans_unlock_items()
365 freed = xfs_trans_unlock_chunk(licp, 0, 0, commit_lsn); in xfs_trans_unlock_items()
368 licp = licp->lic_next; in xfs_trans_unlock_items()
374 while (licp != NULL) { in xfs_trans_unlock_items()
375 ASSERT(!XFS_LIC_ARE_ALL_FREE(licp)); in xfs_trans_unlock_items()
376 freed += xfs_trans_unlock_chunk(licp, 0, 0, commit_lsn); in xfs_trans_unlock_items()
377 next_licp = licp->lic_next; in xfs_trans_unlock_items()
378 if (XFS_LIC_ARE_ALL_FREE(licp)) { in xfs_trans_unlock_items()
380 kmem_free(licp, sizeof(xfs_log_item_chunk_t)); in xfs_trans_unlock_items()
383 licpp = &(licp->lic_next); in xfs_trans_unlock_items()
386 licp = next_licp; in xfs_trans_unlock_items()
406 xfs_log_item_chunk_t *licp, in xfs_trans_unlock_chunk() argument
417 lidp = licp->lic_descs; in xfs_trans_unlock_chunk()
418 for (i = 0; i < licp->lic_unused; i++, lidp++) { in xfs_trans_unlock_chunk()
419 if (XFS_LIC_ISFREE(licp, i)) { in xfs_trans_unlock_chunk()
438 XFS_LIC_RELSE(licp, i); in xfs_trans_unlock_chunk()