Lines Matching refs:busyp

43 	struct xfs_extent_busy	*busyp;  in xfs_extent_busy_insert()  local
74 busyp = rb_entry(parent, struct xfs_extent_busy, rb_node); in xfs_extent_busy_insert()
76 if (new->bno < busyp->bno) { in xfs_extent_busy_insert()
78 ASSERT(new->bno + new->length <= busyp->bno); in xfs_extent_busy_insert()
79 } else if (new->bno > busyp->bno) { in xfs_extent_busy_insert()
81 ASSERT(bno >= busyp->bno + busyp->length); in xfs_extent_busy_insert()
113 struct xfs_extent_busy *busyp; in xfs_extent_busy_search() local
123 busyp = rb_entry(rbp, struct xfs_extent_busy, rb_node); in xfs_extent_busy_search()
124 if (bno < busyp->bno) { in xfs_extent_busy_search()
126 if (bno + len > busyp->bno) in xfs_extent_busy_search()
129 } else if (bno > busyp->bno) { in xfs_extent_busy_search()
131 if (bno < busyp->bno + busyp->length) in xfs_extent_busy_search()
136 match = (busyp->length == len) ? 1 : -1; in xfs_extent_busy_search()
160 struct xfs_extent_busy *busyp, in xfs_extent_busy_update_extent() argument
167 xfs_agblock_t bbno = busyp->bno; in xfs_extent_busy_update_extent()
168 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_update_extent()
175 if (busyp->flags & XFS_EXTENT_BUSY_DISCARDED) { in xfs_extent_busy_update_extent()
251 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_update_extent()
252 busyp->length = 0; in xfs_extent_busy_update_extent()
269 busyp->bno = fend; in xfs_extent_busy_update_extent()
284 busyp->length = fbno - busyp->bno; in xfs_extent_busy_update_extent()
322 struct xfs_extent_busy *busyp = in xfs_extent_busy_reuse() local
324 xfs_agblock_t bbno = busyp->bno; in xfs_extent_busy_reuse()
325 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_reuse()
335 if (!xfs_extent_busy_update_extent(mp, pag, busyp, fbno, flen, in xfs_extent_busy_reuse()
369 struct xfs_extent_busy *busyp = in xfs_extent_busy_trim() local
372 xfs_agblock_t bbno = busyp->bno; in xfs_extent_busy_trim()
373 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_trim()
388 !(busyp->flags & XFS_EXTENT_BUSY_DISCARDED)) { in xfs_extent_busy_trim()
390 busyp, fbno, flen, in xfs_extent_busy_trim()
542 struct xfs_extent_busy *busyp) in xfs_extent_busy_clear_one() argument
544 if (busyp->length) { in xfs_extent_busy_clear_one()
545 trace_xfs_extent_busy_clear(mp, busyp->agno, busyp->bno, in xfs_extent_busy_clear_one()
546 busyp->length); in xfs_extent_busy_clear_one()
547 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_clear_one()
550 list_del_init(&busyp->list); in xfs_extent_busy_clear_one()
551 kmem_free(busyp); in xfs_extent_busy_clear_one()
565 struct xfs_extent_busy *busyp, *n; in xfs_extent_busy_clear() local
569 list_for_each_entry_safe(busyp, n, list, list) { in xfs_extent_busy_clear()
570 if (busyp->agno != agno) { in xfs_extent_busy_clear()
575 pag = xfs_perag_get(mp, busyp->agno); in xfs_extent_busy_clear()
577 agno = busyp->agno; in xfs_extent_busy_clear()
580 if (do_discard && busyp->length && in xfs_extent_busy_clear()
581 !(busyp->flags & XFS_EXTENT_BUSY_SKIP_DISCARD)) in xfs_extent_busy_clear()
582 busyp->flags = XFS_EXTENT_BUSY_DISCARDED; in xfs_extent_busy_clear()
584 xfs_extent_busy_clear_one(mp, pag, busyp); in xfs_extent_busy_clear()