Lines Matching refs:pag
44 struct xfs_perag *pag; in xfs_extent_busy_insert() local
69 pag = xfs_perag_get(tp->t_mountp, new->agno); in xfs_extent_busy_insert()
70 spin_lock(&pag->pagb_lock); in xfs_extent_busy_insert()
71 rbp = &pag->pagb_tree.rb_node; in xfs_extent_busy_insert()
88 rb_insert_color(&new->rb_node, &pag->pagb_tree); in xfs_extent_busy_insert()
91 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_insert()
92 xfs_perag_put(pag); in xfs_extent_busy_insert()
111 struct xfs_perag *pag; in xfs_extent_busy_search() local
116 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_search()
117 spin_lock(&pag->pagb_lock); in xfs_extent_busy_search()
119 rbp = pag->pagb_tree.rb_node; in xfs_extent_busy_search()
140 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_search()
141 xfs_perag_put(pag); in xfs_extent_busy_search()
159 struct xfs_perag *pag, in xfs_extent_busy_update_extent() argument
163 bool userdata) __releases(&pag->pagb_lock) in xfs_extent_busy_update_extent()
164 __acquires(&pag->pagb_lock) in xfs_extent_busy_update_extent()
176 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
178 spin_lock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
251 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_update_extent()
289 trace_xfs_extent_busy_reuse(mp, pag->pag_agno, fbno, flen); in xfs_extent_busy_update_extent()
293 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
295 trace_xfs_extent_busy_force(mp, pag->pag_agno, fbno, flen); in xfs_extent_busy_update_extent()
296 spin_lock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
312 struct xfs_perag *pag; in xfs_extent_busy_reuse() local
317 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_reuse()
318 spin_lock(&pag->pagb_lock); in xfs_extent_busy_reuse()
320 rbp = pag->pagb_tree.rb_node; in xfs_extent_busy_reuse()
335 if (!xfs_extent_busy_update_extent(mp, pag, busyp, fbno, flen, in xfs_extent_busy_reuse()
339 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_reuse()
340 xfs_perag_put(pag); in xfs_extent_busy_reuse()
363 spin_lock(&args->pag->pagb_lock); in xfs_extent_busy_trim()
367 rbp = args->pag->pagb_tree.rb_node; in xfs_extent_busy_trim()
389 if (!xfs_extent_busy_update_extent(args->mp, args->pag, in xfs_extent_busy_trim()
518 spin_unlock(&args->pag->pagb_lock); in xfs_extent_busy_trim()
532 spin_unlock(&args->pag->pagb_lock); in xfs_extent_busy_trim()
541 struct xfs_perag *pag, in xfs_extent_busy_clear_one() argument
547 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_clear_one()
566 struct xfs_perag *pag = NULL; in xfs_extent_busy_clear() local
571 if (pag) { in xfs_extent_busy_clear()
572 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_clear()
573 xfs_perag_put(pag); in xfs_extent_busy_clear()
575 pag = xfs_perag_get(mp, busyp->agno); in xfs_extent_busy_clear()
576 spin_lock(&pag->pagb_lock); in xfs_extent_busy_clear()
584 xfs_extent_busy_clear_one(mp, pag, busyp); in xfs_extent_busy_clear()
587 if (pag) { in xfs_extent_busy_clear()
588 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_clear()
589 xfs_perag_put(pag); in xfs_extent_busy_clear()