Lines Matching refs:aip

5617 	struct allocindir *aip;
5632 aip = (struct allocindir *)newblk;
5633 aip->ai_offset = ptrno;
5634 aip->ai_oldblkno = oldblkno;
5635 aip->ai_lbn = lbn;
5644 return (aip);
5663 struct allocindir *aip;
5676 aip = newallocindir(ip, ptrno, newblkno, oldblkno, lbn);
5688 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list);
5689 freefrag = setup_allocindir_phase2(bp, ip, inodedep, aip, lbn);
5708 struct allocindir *aip;
5717 aip = newallocindir(ip, ptrno, newblkno, 0, lbn);
5722 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list);
5723 if (setup_allocindir_phase2(bp, ip, inodedep, aip, lbn))
5732 struct allocindir *aip;
5737 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL) {
5738 LIST_REMOVE(aip, ai_next);
5739 free_newblk(&aip->ai_block);
5824 * Called to finish the allocation of the "aip" allocated
5828 setup_allocindir_phase2(bp, ip, inodedep, aip, lbn)
5832 struct allocindir *aip; /* allocindir allocated by the above routines */
5846 KASSERT(aip->ai_offset >= 0 && aip->ai_offset < NINDIR(fs),
5847 ("setup_allocindir_phase2: Bad offset %d", aip->ai_offset));
5851 aip->ai_indirdep = indirdep;
5858 if (aip->ai_oldblkno != 0) {
5860 if (oldaip->ai_offset == aip->ai_offset) {
5861 freefrag = allocindir_merge(aip, oldaip);
5866 if (oldaip->ai_offset == aip->ai_offset) {
5867 freefrag = allocindir_merge(aip, oldaip);
5873 LIST_INSERT_HEAD(&indirdep->ir_deplisthd, aip, ai_next);
5882 allocindir_merge(aip, oldaip)
5883 struct allocindir *aip;
5889 if (oldaip->ai_newblkno != aip->ai_oldblkno)
5891 aip->ai_oldblkno = oldaip->ai_oldblkno;
5892 freefrag = aip->ai_freefrag;
5893 aip->ai_freefrag = oldaip->ai_freefrag;
5904 WORKLIST_INSERT(&aip->ai_newdirblk, wk);
6010 struct allocindir *aip, *aipn;
6015 LIST_FOREACH_SAFE(aip, &indirdep->ir_deplisthd, ai_next, aipn)
6016 if (aip->ai_offset > off)
6017 cancel_allocindir(aip, bp, freeblks, 1);
6018 LIST_FOREACH_SAFE(aip, &indirdep->ir_donehd, ai_next, aipn)
6019 if (aip->ai_offset > off)
6020 cancel_allocindir(aip, bp, freeblks, 1);
6024 LIST_FOREACH_SAFE(aip, &indirdep->ir_writehd, ai_next, aipn)
6025 if (aip->ai_offset > off)
6026 cancel_allocindir(aip, NULL, freeblks, 0);
6027 LIST_FOREACH_SAFE(aip, &indirdep->ir_completehd, ai_next, aipn)
6028 if (aip->ai_offset > off)
6029 cancel_allocindir(aip, NULL, freeblks, 0);
7673 struct allocindir *aip;
7694 aip = WK_ALLOCINDIR(wk);
7696 if (aip->ai_state & DELAYEDFREE) {
7699 aip->ai_lbn, aip->ai_newblkno,
8055 cancel_allocindir(aip, bp, freeblks, trunc)
8056 struct allocindir *aip;
8065 newblk = (struct newblk *)aip;
8066 LIST_REMOVE(aip, ai_next);
8073 * Clear the pointer and mark the aip to be freed
8076 aip->ai_state |= DELAYEDFREE;
8077 indirdep = aip->ai_indirdep;
8079 ((ufs1_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
8081 ((ufs2_daddr_t *)bp->b_data)[aip->ai_offset] = 0;
10287 struct allocindir *aip;
10315 while ((aip = LIST_FIRST(&indirdep->ir_deplisthd)) != 0)
10316 cancel_allocindir(aip, bp, freeblks, 0);
10317 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != 0)
10318 cancel_allocindir(aip, NULL, freeblks, 0);
10319 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != 0)
10320 cancel_allocindir(aip, NULL, freeblks, 0);
10321 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != 0)
10322 cancel_allocindir(aip, NULL, freeblks, 0);
10897 handle_allocindir_partdone(aip)
10898 struct allocindir *aip; /* the completed allocindir */
10902 if ((aip->ai_state & ALLCOMPLETE) != ALLCOMPLETE)
10904 indirdep = aip->ai_indirdep;
10905 LIST_REMOVE(aip, ai_next);
10911 LIST_INSERT_HEAD(&indirdep->ir_donehd, aip, ai_next);
10915 ((ufs1_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] =
10916 aip->ai_newblkno;
10918 ((ufs2_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] =
10919 aip->ai_newblkno;
10923 LIST_INSERT_HEAD(&indirdep->ir_writehd, aip, ai_next);
11308 struct allocindir *aip;
11335 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != 0) {
11336 LIST_REMOVE(aip, ai_next);
11338 LIST_INSERT_HEAD(&indirdep->ir_completehd, aip,
11340 newblk_freefrag(&aip->ai_block);
11343 free_newblk(&aip->ai_block);
11350 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != 0) {
11351 handle_allocindir_partdone(aip);
11352 if (aip == LIST_FIRST(&indirdep->ir_donehd))
12273 struct allocindir *aip;
12334 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) {
12335 newblk = (struct newblk *)aip;
13277 struct allocindir *aip;
13328 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) {