Lines Matching refs:aip

6039 	struct allocindir *aip;  in newallocindir()  local
6055 aip = (struct allocindir *)newblk; in newallocindir()
6056 aip->ai_offset = ptrno; in newallocindir()
6057 aip->ai_oldblkno = oldblkno; in newallocindir()
6058 aip->ai_lbn = lbn; in newallocindir()
6067 return (aip); in newallocindir()
6086 struct allocindir *aip; in softdep_setup_allocindir_page() local
6102 aip = newallocindir(ip, ptrno, newblkno, oldblkno, lbn); in softdep_setup_allocindir_page()
6111 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list); in softdep_setup_allocindir_page()
6112 freefrag = setup_allocindir_phase2(bp, ip, inodedep, aip, lbn); in softdep_setup_allocindir_page()
6131 struct allocindir *aip; in softdep_setup_allocindir_meta() local
6143 aip = newallocindir(ip, ptrno, newblkno, 0, lbn); in softdep_setup_allocindir_meta()
6145 WORKLIST_INSERT(&nbp->b_dep, &aip->ai_block.nb_list); in softdep_setup_allocindir_meta()
6146 if (setup_allocindir_phase2(bp, ip, inodedep, aip, lbn)) in softdep_setup_allocindir_meta()
6154 struct allocindir *aip; in indirdep_complete() local
6159 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL) { in indirdep_complete()
6160 LIST_REMOVE(aip, ai_next); in indirdep_complete()
6161 free_newblk(&aip->ai_block); in indirdep_complete()
6255 struct allocindir *aip, /* allocindir allocated by the above routines */ in setup_allocindir_phase2() argument
6271 KASSERT(aip->ai_offset >= 0 && aip->ai_offset < NINDIR(fs), in setup_allocindir_phase2()
6272 ("setup_allocindir_phase2: Bad offset %d", aip->ai_offset)); in setup_allocindir_phase2()
6276 aip->ai_indirdep = indirdep; in setup_allocindir_phase2()
6283 if (aip->ai_oldblkno != 0) { in setup_allocindir_phase2()
6285 if (oldaip->ai_offset == aip->ai_offset) { in setup_allocindir_phase2()
6286 freefrag = allocindir_merge(aip, oldaip); in setup_allocindir_phase2()
6291 if (oldaip->ai_offset == aip->ai_offset) { in setup_allocindir_phase2()
6292 freefrag = allocindir_merge(aip, oldaip); in setup_allocindir_phase2()
6298 LIST_INSERT_HEAD(&indirdep->ir_deplisthd, aip, ai_next); in setup_allocindir_phase2()
6308 struct allocindir *aip, in allocindir_merge() argument
6314 if (oldaip->ai_newblkno != aip->ai_oldblkno) in allocindir_merge()
6316 aip->ai_oldblkno = oldaip->ai_oldblkno; in allocindir_merge()
6317 freefrag = aip->ai_freefrag; in allocindir_merge()
6318 aip->ai_freefrag = oldaip->ai_freefrag; in allocindir_merge()
6329 WORKLIST_INSERT(&aip->ai_newdirblk, wk); in allocindir_merge()
6439 struct allocindir *aip, *aipn; in trunc_indirdep() local
6444 LIST_FOREACH_SAFE(aip, &indirdep->ir_deplisthd, ai_next, aipn) in trunc_indirdep()
6445 if (aip->ai_offset > off) in trunc_indirdep()
6446 cancel_allocindir(aip, bp, freeblks, 1); in trunc_indirdep()
6447 LIST_FOREACH_SAFE(aip, &indirdep->ir_donehd, ai_next, aipn) in trunc_indirdep()
6448 if (aip->ai_offset > off) in trunc_indirdep()
6449 cancel_allocindir(aip, bp, freeblks, 1); in trunc_indirdep()
6453 LIST_FOREACH_SAFE(aip, &indirdep->ir_writehd, ai_next, aipn) in trunc_indirdep()
6454 if (aip->ai_offset > off) in trunc_indirdep()
6455 cancel_allocindir(aip, NULL, freeblks, 0); in trunc_indirdep()
6456 LIST_FOREACH_SAFE(aip, &indirdep->ir_completehd, ai_next, aipn) in trunc_indirdep()
6457 if (aip->ai_offset > off) in trunc_indirdep()
6458 cancel_allocindir(aip, NULL, freeblks, 0); in trunc_indirdep()
8129 struct allocindir *aip; in handle_workitem_freeblocks() local
8152 aip = WK_ALLOCINDIR(wk); in handle_workitem_freeblocks()
8154 if (aip->ai_state & DELAYEDFREE) { in handle_workitem_freeblocks()
8157 aip->ai_lbn, aip->ai_newblkno, in handle_workitem_freeblocks()
8522 struct allocindir *aip, in cancel_allocindir() argument
8531 newblk = (struct newblk *)aip; in cancel_allocindir()
8532 LIST_REMOVE(aip, ai_next); in cancel_allocindir()
8542 aip->ai_state |= DELAYEDFREE; in cancel_allocindir()
8543 indirdep = aip->ai_indirdep; in cancel_allocindir()
8545 ((ufs1_daddr_t *)bp->b_data)[aip->ai_offset] = 0; in cancel_allocindir()
8547 ((ufs2_daddr_t *)bp->b_data)[aip->ai_offset] = 0; in cancel_allocindir()
10813 struct allocindir *aip; in cancel_indirdep() local
10840 while ((aip = LIST_FIRST(&indirdep->ir_deplisthd)) != NULL) in cancel_indirdep()
10841 cancel_allocindir(aip, bp, freeblks, 0); in cancel_indirdep()
10842 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != NULL) in cancel_indirdep()
10843 cancel_allocindir(aip, NULL, freeblks, 0); in cancel_indirdep()
10844 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != NULL) in cancel_indirdep()
10845 cancel_allocindir(aip, NULL, freeblks, 0); in cancel_indirdep()
10846 while ((aip = LIST_FIRST(&indirdep->ir_completehd)) != NULL) in cancel_indirdep()
10847 cancel_allocindir(aip, NULL, freeblks, 0); in cancel_indirdep()
11502 struct allocindir *aip) /* the completed allocindir */ in handle_allocindir_partdone() argument
11506 if ((aip->ai_state & ALLCOMPLETE) != ALLCOMPLETE) in handle_allocindir_partdone()
11508 indirdep = aip->ai_indirdep; in handle_allocindir_partdone()
11509 LIST_REMOVE(aip, ai_next); in handle_allocindir_partdone()
11515 LIST_INSERT_HEAD(&indirdep->ir_donehd, aip, ai_next); in handle_allocindir_partdone()
11519 ((ufs1_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = in handle_allocindir_partdone()
11520 aip->ai_newblkno; in handle_allocindir_partdone()
11522 ((ufs2_daddr_t *)indirdep->ir_savebp->b_data)[aip->ai_offset] = in handle_allocindir_partdone()
11523 aip->ai_newblkno; in handle_allocindir_partdone()
11527 LIST_INSERT_HEAD(&indirdep->ir_writehd, aip, ai_next); in handle_allocindir_partdone()
11944 struct allocindir *aip; in handle_written_indirdep() local
11981 while ((aip = LIST_FIRST(&indirdep->ir_writehd)) != NULL) { in handle_written_indirdep()
11982 LIST_REMOVE(aip, ai_next); in handle_written_indirdep()
11984 LIST_INSERT_HEAD(&indirdep->ir_completehd, aip, in handle_written_indirdep()
11986 newblk_freefrag(&aip->ai_block); in handle_written_indirdep()
11989 free_newblk(&aip->ai_block); in handle_written_indirdep()
11996 while ((aip = LIST_FIRST(&indirdep->ir_donehd)) != NULL) { in handle_written_indirdep()
11997 handle_allocindir_partdone(aip); in handle_written_indirdep()
11998 if (aip == LIST_FIRST(&indirdep->ir_donehd)) in handle_written_indirdep()
12966 struct allocindir *aip; in softdep_sync_buf() local
13030 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) { in softdep_sync_buf()
13031 newblk = (struct newblk *)aip; in softdep_sync_buf()
14333 struct allocindir *aip; in softdep_count_dependencies() local
14386 LIST_FOREACH(aip, &indirdep->ir_deplisthd, ai_next) { in softdep_count_dependencies()
14865 allocindir_print(struct allocindir *aip) in allocindir_print() argument
14868 newblk_print(&aip->ai_block); in allocindir_print()
14870 (intmax_t)aip->ai_oldblkno, (intmax_t)aip->ai_lbn); in allocindir_print()
14872 aip->ai_offset, aip->ai_indirdep); in allocindir_print()