Lines Matching full:dap

1349 	struct diradd *dap;  in get_parent_vp_unlock_bp()  local
1357 while ((dap = LIST_FIRST(unfinishedp)) != NULL) { in get_parent_vp_unlock_bp()
1358 LIST_REMOVE(dap, da_pdlist); in get_parent_vp_unlock_bp()
1359 LIST_INSERT_HEAD(diraddhdp, dap, da_pdlist); in get_parent_vp_unlock_bp()
7460 struct diradd *dap; in cancel_pagedep() local
7462 LIST_FOREACH(dap, &pagedep->pd_pendinghd, da_pdlist) in cancel_pagedep()
7463 if (dap->da_offset > blkoff) in cancel_pagedep()
7465 dap, dap->da_offset, blkoff); in cancel_pagedep()
7467 LIST_FOREACH(dap, &pagedep->pd_diraddhd[i], da_pdlist) in cancel_pagedep()
7468 if (dap->da_offset > blkoff) in cancel_pagedep()
7470 dap, dap->da_offset, blkoff); in cancel_pagedep()
7740 struct diradd *dap; in free_newdirblk() local
7758 while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != NULL) in free_newdirblk()
7759 free_diradd(dap, NULL); in free_newdirblk()
8580 struct diradd *dap, in setup_newdir() argument
8596 mp = dap->da_list.wk_mp; in setup_newdir()
8605 mkdir1->md_diradd = dap; in setup_newdir()
8610 mkdir2->md_diradd = dap; in setup_newdir()
8665 dap->da_state &= ~MKDIR_PARENT; in setup_newdir()
8712 struct diradd *dap; in softdep_setup_directory_add() local
8740 dap = malloc(sizeof(struct diradd), M_DIRADD, in softdep_setup_directory_add()
8742 workitem_alloc(&dap->da_list, D_DIRADD, mp); in softdep_setup_directory_add()
8743 dap->da_offset = offset; in softdep_setup_directory_add()
8744 dap->da_newinum = newinum; in softdep_setup_directory_add()
8745 dap->da_state = ATTACHED; in softdep_setup_directory_add()
8746 LIST_INIT(&dap->da_jwork); in softdep_setup_directory_add()
8758 * the dap state to wait for them. Otherwise it's COMPLETE and in softdep_setup_directory_add()
8762 dap->da_state |= DEPCOMPLETE; in softdep_setup_directory_add()
8765 dap->da_state |= MKDIR_BODY | MKDIR_PARENT; in softdep_setup_directory_add()
8766 mkdir1 = setup_newdir(dap, newinum, dp->i_number, newdirbp, in softdep_setup_directory_add()
8778 dap->da_pagedep = pagedep; in softdep_setup_directory_add()
8779 LIST_INSERT_HEAD(&pagedep->pd_diraddhd[DIRADDHASH(offset)], dap, in softdep_setup_directory_add()
8795 jaddref->ja_diradd = dap; in softdep_setup_directory_add()
8798 diradd_inode_written(dap, inodedep); in softdep_setup_directory_add()
8800 WORKLIST_INSERT(&inodedep->id_bufwait, &dap->da_list); in softdep_setup_directory_add()
8836 inodedep->id_mkdiradd = dap; in softdep_setup_directory_add()
8838 merge_diradd(inodedep, dap); in softdep_setup_directory_add()
8887 struct diradd *dap; in softdep_change_directoryentry_offset() local
8920 dap = diradd_lookup(pagedep, oldoffset); in softdep_change_directoryentry_offset()
8921 if (dap) { in softdep_change_directoryentry_offset()
8922 dap->da_offset = newoffset; in softdep_change_directoryentry_offset()
8925 if ((dap->da_state & ALLCOMPLETE) != ALLCOMPLETE && in softdep_change_directoryentry_offset()
8927 LIST_REMOVE(dap, da_pdlist); in softdep_change_directoryentry_offset()
8929 dap, da_pdlist); in softdep_change_directoryentry_offset()
8991 complete_diradd(struct diradd *dap) in complete_diradd() argument
8995 if ((dap->da_state & ALLCOMPLETE) == ALLCOMPLETE) { in complete_diradd()
8996 if (dap->da_state & DIRCHG) in complete_diradd()
8997 pagedep = dap->da_previous->dm_pagedep; in complete_diradd()
8999 pagedep = dap->da_pagedep; in complete_diradd()
9000 LIST_REMOVE(dap, da_pdlist); in complete_diradd()
9001 LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); in complete_diradd()
9011 struct diradd *dap, in cancel_diradd() argument
9028 free_diradd(dap, NULL); in cancel_diradd()
9035 if (inodedep_lookup(dap->da_list.wk_mp, dap->da_newinum, in cancel_diradd()
9042 if (jaddref->ja_diradd != dap) in cancel_diradd()
9056 if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) { in cancel_diradd()
9057 ump = VFSTOUFS(dap->da_list.wk_mp); in cancel_diradd()
9059 if (mkdir->md_diradd != dap) in cancel_diradd()
9086 jwork_move(&dirrem->dm_jwork, &dap->da_jwork); in cancel_diradd()
9087 free_diradd(dap, &dirrem->dm_jwork); in cancel_diradd()
9094 free_diradd(struct diradd *dap, struct workhead *wkhd) in free_diradd() argument
9102 ump = VFSTOUFS(dap->da_list.wk_mp); in free_diradd()
9104 LIST_REMOVE(dap, da_pdlist); in free_diradd()
9105 if (dap->da_state & ONWORKLIST) in free_diradd()
9106 WORKLIST_REMOVE(&dap->da_list); in free_diradd()
9107 if ((dap->da_state & DIRCHG) == 0) { in free_diradd()
9108 pagedep = dap->da_pagedep; in free_diradd()
9110 dirrem = dap->da_previous; in free_diradd()
9117 if (inodedep_lookup(pagedep->pd_list.wk_mp, dap->da_newinum, in free_diradd()
9119 if (inodedep->id_mkdiradd == dap) in free_diradd()
9121 if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) { in free_diradd()
9125 if (mkdir->md_diradd != dap) in free_diradd()
9127 dap->da_state &= in free_diradd()
9135 if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) == 0) in free_diradd()
9138 if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) != 0) in free_diradd()
9146 handle_jwork(&dap->da_jwork); in free_diradd()
9147 WORKITEM_FREE(dap, D_DIRADD); in free_diradd()
9232 struct diradd *dap; in diradd_lookup() local
9234 LIST_FOREACH(dap, &pagedep->pd_diraddhd[DIRADDHASH(offset)], da_pdlist) in diradd_lookup()
9235 if (dap->da_offset == offset) in diradd_lookup()
9236 return (dap); in diradd_lookup()
9237 LIST_FOREACH(dap, &pagedep->pd_pendinghd, da_pdlist) in diradd_lookup()
9238 if (dap->da_offset == offset) in diradd_lookup()
9239 return (dap); in diradd_lookup()
9255 struct diradd *dap; in cancel_diradd_dotdot() local
9260 dap = diradd_lookup(pagedep, DOTDOT_OFFSET); in cancel_diradd_dotdot()
9261 if (dap == NULL) in cancel_diradd_dotdot()
9263 cancel_diradd(dap, dirrem, jremref, NULL, NULL); in cancel_diradd_dotdot()
9288 struct diradd *dap; in cancel_mkdir_dotdot() local
9294 dap = inodedep->id_mkdiradd; in cancel_mkdir_dotdot()
9295 if (dap == NULL || (dap->da_state & MKDIR_PARENT) == 0) in cancel_mkdir_dotdot()
9300 if (mkdir->md_diradd == dap && mkdir->md_state & MKDIR_PARENT) in cancel_mkdir_dotdot()
9369 struct diradd *dap; in newdirrem() local
9457 dap = diradd_lookup(pagedep, offset); in newdirrem()
9458 if (dap == NULL) { in newdirrem()
9471 if ((dap->da_state & ATTACHED) == 0) in newdirrem()
9473 if (dap->da_newinum != ip->i_number) in newdirrem()
9475 (uintmax_t)ip->i_number, (uintmax_t)dap->da_newinum); in newdirrem()
9481 if ((dap->da_state & DIRCHG) != 0) { in newdirrem()
9482 *prevdirremp = dap->da_previous; in newdirrem()
9483 dap->da_state &= ~DIRCHG; in newdirrem()
9484 dap->da_pagedep = pagedep; in newdirrem()
9491 cancel_diradd(dap, dirrem, jremref, dotremref, dotdotremref); in newdirrem()
9531 struct diradd *dap = NULL; in softdep_setup_directory_change() local
9549 dap = malloc(sizeof(struct diradd), in softdep_setup_directory_change()
9551 workitem_alloc(&dap->da_list, D_DIRADD, mp); in softdep_setup_directory_change()
9552 dap->da_state = DIRCHG | ATTACHED | DEPCOMPLETE; in softdep_setup_directory_change()
9553 dap->da_offset = offset; in softdep_setup_directory_change()
9554 dap->da_newinum = newinum; in softdep_setup_directory_change()
9555 LIST_INIT(&dap->da_jwork); in softdep_setup_directory_change()
9618 dap->da_previous = dirrem; in softdep_setup_directory_change()
9621 dap->da_previous = prevdirrem; in softdep_setup_directory_change()
9623 dap->da_state &= ~DIRCHG; in softdep_setup_directory_change()
9624 dap->da_pagedep = pagedep; in softdep_setup_directory_change()
9645 jaddref->ja_diradd = dap; in softdep_setup_directory_change()
9647 dap, da_pdlist); in softdep_setup_directory_change()
9650 dap->da_state |= COMPLETE; in softdep_setup_directory_change()
9651 LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, da_pdlist); in softdep_setup_directory_change()
9652 WORKLIST_INSERT(&inodedep->id_pendinghd, &dap->da_list); in softdep_setup_directory_change()
9655 dap, da_pdlist); in softdep_setup_directory_change()
9656 WORKLIST_INSERT(&inodedep->id_bufwait, &dap->da_list); in softdep_setup_directory_change()
9664 merge_diradd(inodedep, dap); in softdep_setup_directory_change()
10344 struct diradd *dap; in initiate_write_filepage() local
10371 LIST_FOREACH(dap, &pagedep->pd_diraddhd[i], da_pdlist) { in initiate_write_filepage()
10373 ((char *)bp->b_data + dap->da_offset); in initiate_write_filepage()
10374 if (ep->d_ino != dap->da_newinum) in initiate_write_filepage()
10378 (uintmax_t)dap->da_newinum); in initiate_write_filepage()
10379 if (dap->da_state & DIRCHG) in initiate_write_filepage()
10380 ep->d_ino = dap->da_previous->dm_oldinum; in initiate_write_filepage()
10383 dap->da_state &= ~ATTACHED; in initiate_write_filepage()
10384 dap->da_state |= UNDONE; in initiate_write_filepage()
12038 struct diradd *dap, in diradd_inode_written() argument
12042 LOCK_OWNED(VFSTOUFS(dap->da_list.wk_mp)); in diradd_inode_written()
12043 dap->da_state |= COMPLETE; in diradd_inode_written()
12044 complete_diradd(dap); in diradd_inode_written()
12045 WORKLIST_INSERT(&inodedep->id_pendinghd, &dap->da_list); in diradd_inode_written()
12275 struct diradd *dap; in complete_mkdir() local
12280 dap = mkdir->md_diradd; in complete_mkdir()
12281 dap->da_state &= ~(mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)); in complete_mkdir()
12282 if ((dap->da_state & (MKDIR_PARENT | MKDIR_BODY)) == 0) { in complete_mkdir()
12283 dap->da_state |= DEPCOMPLETE; in complete_mkdir()
12284 complete_diradd(dap); in complete_mkdir()
12344 struct diradd *dap, *nextdap; in handle_written_filepage() local
12370 while ((dap = LIST_FIRST(&pagedep->pd_pendinghd)) != NULL) in handle_written_filepage()
12371 free_diradd(dap, NULL); in handle_written_filepage()
12377 for (dap = LIST_FIRST(&pagedep->pd_diraddhd[i]); dap; in handle_written_filepage()
12378 dap = nextdap) { in handle_written_filepage()
12379 nextdap = LIST_NEXT(dap, da_pdlist); in handle_written_filepage()
12380 if (dap->da_state & ATTACHED) in handle_written_filepage()
12383 ((char *)bp->b_data + dap->da_offset); in handle_written_filepage()
12384 ep->d_ino = dap->da_newinum; in handle_written_filepage()
12385 dap->da_state &= ~UNDONE; in handle_written_filepage()
12386 dap->da_state |= ATTACHED; in handle_written_filepage()
12393 if ((dap->da_state & ALLCOMPLETE) == ALLCOMPLETE) { in handle_written_filepage()
12394 LIST_REMOVE(dap, da_pdlist); in handle_written_filepage()
12395 LIST_INSERT_HEAD(&pagedep->pd_pendinghd, dap, in handle_written_filepage()
12662 struct diradd *dap; in softdep_fsync() local
12704 dap = WK_DIRADD(wk); in softdep_fsync()
12709 if (dap->da_state & DIRCHG) in softdep_fsync()
12710 pagedep = dap->da_previous->dm_pagedep; in softdep_fsync()
12712 pagedep = dap->da_pagedep; in softdep_fsync()
12715 if ((dap->da_state & (MKDIR_BODY | COMPLETE)) != COMPLETE) in softdep_fsync()
12717 if ((dap->da_state & MKDIR_PARENT) || in softdep_fsync()
12769 dap = WK_DIRADD(wk); in softdep_fsync()
12770 if (dap->da_state & DIRCHG) in softdep_fsync()
12771 pagedep = dap->da_previous->dm_pagedep; in softdep_fsync()
12773 pagedep = dap->da_pagedep; in softdep_fsync()
13322 struct diradd *dap; in flush_pagedep_deps() local
13333 while ((dap = LIST_FIRST(diraddhdp)) != NULL) { in flush_pagedep_deps()
13338 if (dap->da_state & MKDIR_PARENT) { in flush_pagedep_deps()
13346 if (dap != LIST_FIRST(diraddhdp)) in flush_pagedep_deps()
13359 LIST_REMOVE(dap, da_pdlist); in flush_pagedep_deps()
13360 LIST_INSERT_HEAD(&unfinished, dap, da_pdlist); in flush_pagedep_deps()
13368 inum = dap->da_newinum; in flush_pagedep_deps()
13382 if (dap->da_state & MKDIR_BODY) { in flush_pagedep_deps()
13394 if (error == 0 && dap == LIST_FIRST(diraddhdp)) in flush_pagedep_deps()
13403 if (dap != LIST_FIRST(diraddhdp)) in flush_pagedep_deps()
13405 if (dap->da_state & MKDIR_BODY) { in flush_pagedep_deps()
13409 "inodedep %p dap %p vp %p", in flush_pagedep_deps()
13410 inodedep, dap, vp); in flush_pagedep_deps()
13439 if (dap != LIST_FIRST(diraddhdp)) in flush_pagedep_deps()
13447 if (dap == LIST_FIRST(diraddhdp)) { in flush_pagedep_deps()
13463 if (dap == LIST_FIRST(diraddhdp)) { in flush_pagedep_deps()
13466 "inodedep %p ino %ju dap %p", in flush_pagedep_deps()
13467 inodedep, (uintmax_t)inum, dap); in flush_pagedep_deps()
13472 while ((dap = LIST_FIRST(&unfinished)) != NULL) { in flush_pagedep_deps()
13473 LIST_REMOVE(dap, da_pdlist); in flush_pagedep_deps()
13474 LIST_INSERT_HEAD(diraddhdp, dap, da_pdlist); in flush_pagedep_deps()
14338 struct diradd *dap; in softdep_count_dependencies() local
14405 LIST_FOREACH(dap, &pagedep->pd_diraddhd[i], da_pdlist) { in softdep_count_dependencies()