Lines Matching refs:pag

252 	struct xfs_perag *pag;  in xfs_ialloc_ag_alloc()  local
382 pag = xfs_perag_get(args.mp, agno); in xfs_ialloc_ag_alloc()
383 pag->pagi_freecount += newlen; in xfs_ialloc_ag_alloc()
384 xfs_perag_put(pag); in xfs_ialloc_ag_alloc()
459 xfs_perag_t *pag; /* per allocation group data */ in xfs_ialloc_ag_select() local
487 pag = xfs_perag_get(mp, agno); in xfs_ialloc_ag_select()
488 if (!pag->pagi_init) { in xfs_ialloc_ag_select()
496 if (!pag->pagi_inodeok) { in xfs_ialloc_ag_select()
505 ineed = pag->pagi_freecount ? 0 : XFS_IALLOC_BLOCKS(mp); in xfs_ialloc_ag_select()
506 if (ineed && !pag->pagf_init) { in xfs_ialloc_ag_select()
514 if (!ineed || pag->pagf_init) { in xfs_ialloc_ag_select()
515 if (ineed && !(longest = pag->pagf_longest)) in xfs_ialloc_ag_select()
516 longest = pag->pagf_flcount > 0; in xfs_ialloc_ag_select()
518 (pag->pagf_freeblks >= needspace + ineed && in xfs_ialloc_ag_select()
526 xfs_perag_put(pag); in xfs_ialloc_ag_select()
534 xfs_perag_put(pag); in xfs_ialloc_ag_select()
668 struct xfs_perag *pag; in xfs_dialloc() local
768 pag = xfs_perag_get(mp, tagno); in xfs_dialloc()
769 if (pag->pagi_inodeok == 0) { in xfs_dialloc()
770 xfs_perag_put(pag); in xfs_dialloc()
774 xfs_perag_put(pag); in xfs_dialloc()
787 pag = xfs_perag_get(mp, agno); in xfs_dialloc()
842 pag->pagl_pagino == pagino && in xfs_dialloc()
843 pag->pagl_leftrec != NULLAGINO && in xfs_dialloc()
844 pag->pagl_rightrec != NULLAGINO) { in xfs_dialloc()
845 error = xfs_ialloc_get_rec(tcur, pag->pagl_leftrec, in xfs_dialloc()
850 error = xfs_ialloc_get_rec(cur, pag->pagl_rightrec, in xfs_dialloc()
878 pag->pagl_leftrec = trec.ir_startino; in xfs_dialloc()
879 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc()
880 pag->pagl_pagino = pagino; in xfs_dialloc()
899 pag->pagl_leftrec = trec.ir_startino; in xfs_dialloc()
900 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc()
901 pag->pagl_pagino = pagino; in xfs_dialloc()
909 pag->pagl_leftrec = trec.ir_startino; in xfs_dialloc()
910 pag->pagl_rightrec = rec.ir_startino; in xfs_dialloc()
911 pag->pagl_pagino = pagino; in xfs_dialloc()
934 pag->pagl_pagino = NULLAGINO; in xfs_dialloc()
935 pag->pagl_leftrec = NULLAGINO; in xfs_dialloc()
936 pag->pagl_rightrec = NULLAGINO; in xfs_dialloc()
1003 pag->pagi_freecount--; in xfs_dialloc()
1011 xfs_perag_put(pag); in xfs_dialloc()
1018 xfs_perag_put(pag); in xfs_dialloc()
1049 struct xfs_perag *pag; in xfs_difree() local
1145 pag = xfs_perag_get(mp, agno); in xfs_difree()
1146 pag->pagi_freecount -= ilen - 1; in xfs_difree()
1147 xfs_perag_put(pag); in xfs_difree()
1175 pag = xfs_perag_get(mp, agno); in xfs_difree()
1176 pag->pagi_freecount++; in xfs_difree()
1177 xfs_perag_put(pag); in xfs_difree()
1520 struct xfs_perag *pag; /* per allocation group data */ in xfs_ialloc_read_agi() local
1528 pag = xfs_perag_get(mp, agno); in xfs_ialloc_read_agi()
1529 if (!pag->pagi_init) { in xfs_ialloc_read_agi()
1530 pag->pagi_freecount = be32_to_cpu(agi->agi_freecount); in xfs_ialloc_read_agi()
1531 pag->pagi_count = be32_to_cpu(agi->agi_count); in xfs_ialloc_read_agi()
1532 pag->pagi_init = 1; in xfs_ialloc_read_agi()
1539 ASSERT(pag->pagi_freecount == be32_to_cpu(agi->agi_freecount) || in xfs_ialloc_read_agi()
1541 xfs_perag_put(pag); in xfs_ialloc_read_agi()