Lines Matching refs:pag

32 	struct xfs_perag	*pag;  in xfs_extent_busy_insert()  local
46 pag = xfs_perag_get(tp->t_mountp, new->agno); in xfs_extent_busy_insert()
47 spin_lock(&pag->pagb_lock); in xfs_extent_busy_insert()
48 rbp = &pag->pagb_tree.rb_node; in xfs_extent_busy_insert()
65 rb_insert_color(&new->rb_node, &pag->pagb_tree); in xfs_extent_busy_insert()
68 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_insert()
69 xfs_perag_put(pag); in xfs_extent_busy_insert()
88 struct xfs_perag *pag; in xfs_extent_busy_search() local
93 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_search()
94 spin_lock(&pag->pagb_lock); in xfs_extent_busy_search()
96 rbp = pag->pagb_tree.rb_node; in xfs_extent_busy_search()
117 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_search()
118 xfs_perag_put(pag); in xfs_extent_busy_search()
136 struct xfs_perag *pag, in xfs_extent_busy_update_extent() argument
140 bool userdata) __releases(&pag->pagb_lock) in xfs_extent_busy_update_extent()
141 __acquires(&pag->pagb_lock) in xfs_extent_busy_update_extent()
153 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
155 spin_lock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
228 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_update_extent()
266 trace_xfs_extent_busy_reuse(mp, pag->pag_agno, fbno, flen); in xfs_extent_busy_update_extent()
270 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
272 trace_xfs_extent_busy_force(mp, pag->pag_agno, fbno, flen); in xfs_extent_busy_update_extent()
273 spin_lock(&pag->pagb_lock); in xfs_extent_busy_update_extent()
289 struct xfs_perag *pag; in xfs_extent_busy_reuse() local
294 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_reuse()
295 spin_lock(&pag->pagb_lock); in xfs_extent_busy_reuse()
297 rbp = pag->pagb_tree.rb_node; in xfs_extent_busy_reuse()
312 if (!xfs_extent_busy_update_extent(mp, pag, busyp, fbno, flen, in xfs_extent_busy_reuse()
316 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_reuse()
317 xfs_perag_put(pag); in xfs_extent_busy_reuse()
346 spin_lock(&args->pag->pagb_lock); in xfs_extent_busy_trim()
350 rbp = args->pag->pagb_tree.rb_node; in xfs_extent_busy_trim()
372 if (!xfs_extent_busy_update_extent(args->mp, args->pag, in xfs_extent_busy_trim()
508 *busy_gen = args->pag->pagb_gen; in xfs_extent_busy_trim()
511 spin_unlock(&args->pag->pagb_lock); in xfs_extent_busy_trim()
525 struct xfs_perag *pag, in xfs_extent_busy_clear_one() argument
531 rb_erase(&busyp->rb_node, &pag->pagb_tree); in xfs_extent_busy_clear_one()
540 struct xfs_perag *pag, in xfs_extent_busy_put_pag() argument
542 __releases(pag->pagb_lock) in xfs_extent_busy_put_pag()
545 pag->pagb_gen++; in xfs_extent_busy_put_pag()
546 wake_up_all(&pag->pagb_wait); in xfs_extent_busy_put_pag()
549 spin_unlock(&pag->pagb_lock); in xfs_extent_busy_put_pag()
550 xfs_perag_put(pag); in xfs_extent_busy_put_pag()
565 struct xfs_perag *pag = NULL; in xfs_extent_busy_clear() local
571 if (pag) in xfs_extent_busy_clear()
572 xfs_extent_busy_put_pag(pag, wakeup); in xfs_extent_busy_clear()
574 pag = xfs_perag_get(mp, agno); in xfs_extent_busy_clear()
575 spin_lock(&pag->pagb_lock); in xfs_extent_busy_clear()
583 xfs_extent_busy_clear_one(mp, pag, busyp); in xfs_extent_busy_clear()
588 if (pag) in xfs_extent_busy_clear()
589 xfs_extent_busy_put_pag(pag, wakeup); in xfs_extent_busy_clear()
598 struct xfs_perag *pag, in xfs_extent_busy_flush() argument
609 prepare_to_wait(&pag->pagb_wait, &wait, TASK_KILLABLE); in xfs_extent_busy_flush()
610 if (busy_gen != READ_ONCE(pag->pagb_gen)) in xfs_extent_busy_flush()
615 finish_wait(&pag->pagb_wait, &wait); in xfs_extent_busy_flush()
626 struct xfs_perag *pag = xfs_perag_get(mp, agno); in xfs_extent_busy_wait_all() local
629 prepare_to_wait(&pag->pagb_wait, &wait, TASK_KILLABLE); in xfs_extent_busy_wait_all()
630 if (RB_EMPTY_ROOT(&pag->pagb_tree)) in xfs_extent_busy_wait_all()
634 finish_wait(&pag->pagb_wait, &wait); in xfs_extent_busy_wait_all()
636 xfs_perag_put(pag); in xfs_extent_busy_wait_all()