Lines Matching refs:aip

5782 	struct allocindir *aip;
5797 aip = (struct allocindir *)newblk;
5798 aip->ai_offset = ptrno;
5799 aip->ai_oldblkno = oldblkno;
5800 aip->ai_lbn = lbn;
5809 return (aip);
5828 struct allocindir *aip;
5844 aip = newallocindir(ip, ptrno, newblkno, oldblkno, lbn);
5853 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list);
5854 freefrag = setup_allocindir_phase2(bp, ip, inodedep, aip, lbn);
5873 struct allocindir *aip;
5885 aip = newallocindir(ip, ptrno, newblkno, 0, lbn);
5887 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list);
5888 if (setup_allocindir_phase2(bp, ip, inodedep, aip, lbn))
5897 struct allocindir *aip;
5902 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL) {
5903 LIST_REMOVE(aip, ai_next);
5904 free_newblk(&aip->ai_block);
5991 * Called to finish the allocation of the "aip" allocated
5995 setup_allocindir_phase2(bp, ip, inodedep, aip, lbn)
5999 struct allocindir *aip; /* allocindir allocated by the above routines */
6015 KASSERT(aip->ai_offset >= 0 && aip->ai_offset < NINDIR(fs),
6016 ("setup_allocindir_phase2: Bad offset %d", aip->ai_offset));
6020 aip->ai_indirdep = indirdep;
6027 if (aip->ai_oldblkno != 0) {
6029 if (oldaip->ai_offset == aip->ai_offset) {
6030 freefrag = allocindir_merge(aip, oldaip);
6035 if (oldaip->ai_offset == aip->ai_offset) {
6036 freefrag = allocindir_merge(aip, oldaip);
6042 LIST_INSERT_HEAD(&indirdep->ir_deplisthd, aip, ai_next);
6051 allocindir_merge(aip, oldaip)
6052 struct allocindir *aip;
6058 if (oldaip->ai_newblkno != aip->ai_oldblkno)
6060 aip->ai_oldblkno = oldaip->ai_oldblkno;
6061 freefrag = aip->ai_freefrag;
6062 aip->ai_freefrag = oldaip->ai_freefrag;
6073 WORKLIST_INSERT(&aip->ai_newdirblk, wk);
6185 struct allocindir *aip, *aipn;
6190 LIST_FOREACH_SAFE(aip, &indirdep->ir_deplisthd, ai_next, aipn)
6191 if (aip->ai_offset > off)
6192 cancel_allocindir(aip, bp, freeblks, 1);
6193 LIST_FOREACH_SAFE(aip, &indirdep->ir_donehd, ai_next, aipn)
6194 if (aip->ai_offset > off)
6195 cancel_allocindir(aip, bp, freeblks, 1);
6199 LIST_FOREACH_SAFE(aip, &indirdep->ir_writehd, ai_next, aipn)
6200 if (aip->ai_offset > off)
6201 cancel_allocindir(aip, NULL, freeblks, 0);
6202 LIST_FOREACH_SAFE(aip, &indirdep->ir_completehd, ai_next, aipn)
6203 if (aip->ai_offset > off)
6204 cancel_allocindir(aip, NULL, freeblks, 0);
7889 struct allocindir *aip;
7910 aip = WK_ALLOCINDIR(wk);
7912 if (aip->ai_state & DELAYEDFREE) {
7915 aip->ai_lbn, aip->ai_newblkno,
8271 cancel_allocindir(aip, bp, freeblks, trunc)
8272 struct allocindir *aip;
8281 newblk = (struct newblk *)aip;
8282 LIST_REMOVE(aip, ai_next);
8289 * Clear the pointer and mark the aip to be freed
8292 aip->ai_state |= DELAYEDFREE;
8293 indirdep = aip->ai_indirdep;
8295 ((ufs1_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
8297 ((ufs2_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
10558 struct allocindir *aip;
10585 while ((aip = LIST_FIRST(&indirdep->ir_deplisthd)) != NULL)
10586 cancel_allocindir(aip, bp, freeblks, 0);
10587 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != NULL)
10588 cancel_allocindir(aip, NULL, freeblks, 0);
10589 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != NULL)
10590 cancel_allocindir(aip, NULL, freeblks, 0);
10591 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL)
10592 cancel_allocindir(aip, NULL, freeblks, 0);
11223 handle_allocindir_partdone(aip)
11224 struct allocindir *aip; /* the completed allocindir */
11228 if ((aip->ai_state & ALLCOMPLETE) != ALLCOMPLETE)
11230 indirdep = aip->ai_indirdep;
11231 LIST_REMOVE(aip, ai_next);
11237 LIST_INSERT_HEAD(&indirdep->ir_donehd, aip, ai_next);
11241 ((ufs1_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] =
11242 aip->ai_newblkno;
11244 ((ufs2_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] =
11245 aip->ai_newblkno;
11249 LIST_INSERT_HEAD(&indirdep->ir_writehd, aip, ai_next);
11658 struct allocindir *aip;
11695 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != NULL) {
11696 LIST_REMOVE(aip, ai_next);
11698 LIST_INSERT_HEAD(&indirdep->ir_completehd, aip,
11700 newblk_freefrag(&aip->ai_block);
11703 free_newblk(&aip->ai_block);
11710 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != NULL) {
11711 handle_allocindir_partdone(aip);
11712 if (aip == LIST_FIRST(&indirdep->ir_donehd))
12672 struct allocindir *aip;
12737 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) {
12738 newblk = (struct newblk *)aip;
13963 struct allocindir *aip;
14017 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) {