Lines Matching refs:mkdir
659 SOFTDEP_TYPE(MKDIR, mkdir, "New directory");
795 static void handle_written_mkdir(struct mkdir *, int);
829 static void complete_mkdir(struct mkdir *);
952 static struct mkdir *setup_newdir(struct diradd *, ino_t, ino_t, struct buf *,
953 struct mkdir **);
3768 struct mkdir *mkdir;
3772 mkdir = NULL;
3783 mkdir = jaddref->ja_mkdir;
3784 WORKLIST_INSERT(&inodedep->id_bufwait, &mkdir->md_list);
3786 mkdir = jaddref->ja_mkdir;
3796 * The mkdir may be waiting on the jaddref to clear before freeing.
3798 if (mkdir) {
3799 KASSERT(mkdir->md_list.wk_type == D_MKDIR,
3800 ("handle_written_jaddref: Incorrect type for mkdir %s",
3801 TYPENAME(mkdir->md_list.wk_type)));
3802 mkdir->md_jaddref = NULL;
3803 diradd = mkdir->md_diradd;
3804 mkdir->md_state |= DEPCOMPLETE;
3805 complete_mkdir(mkdir);
4709 * We don't set MKDIR_PARENT as this is not tied to a mkdir and
4904 * Called to release the journal structures created by a failed mkdir
8300 * Create the mkdir dependencies for . and .. in a new directory. Link them
8306 static struct mkdir *
8312 struct mkdir **mkdirp;
8318 struct mkdir *mkdir1, *mkdir2;
8330 mkdir1 = malloc(sizeof(struct mkdir), M_MKDIR, M_SOFTDEP_FLAGS);
8335 mkdir2 = malloc(sizeof(struct mkdir), M_MKDIR, M_SOFTDEP_FLAGS);
8434 struct buf *newdirbp; /* non-NULL => contents of new mkdir */
8445 struct mkdir *mkdir1, *mkdir2;
8563 panic("softdep_setup_directory_add: Existing mkdir");
8669 * Move the mkdir dependencies and journal work from one diradd to another
8670 * when renaming a directory. The new name must depend on the mkdir deps
8680 struct mkdir *mkdir, *nextmd;
8689 for (mkdir = LIST_FIRST(&ump->softdep_mkdirlisthd); mkdir;
8690 mkdir = nextmd) {
8691 nextmd = LIST_NEXT(mkdir, md_mkdirs);
8692 if (mkdir->md_diradd != olddap)
8694 mkdir->md_diradd = newdap;
8695 state = mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY);
8706 * Any mkdir related journal items are not safe to be freed until
8750 struct mkdir *mkdir;
8787 LIST_FOREACH(mkdir, &ump->softdep_mkdirlisthd, md_mkdirs) {
8788 if (mkdir->md_diradd != dap)
8790 if ((jaddref = mkdir->md_jaddref) == NULL)
8792 mkdir->md_jaddref = NULL;
8793 if (mkdir->md_state & MKDIR_PARENT) {
8831 struct mkdir *mkdir, *nextmd;
8854 for (mkdir = LIST_FIRST(&ump->softdep_mkdirlisthd); mkdir;
8855 mkdir = nextmd) {
8856 nextmd = LIST_NEXT(mkdir, md_mkdirs);
8857 if (mkdir->md_diradd != dap)
8860 ~(mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY));
8861 LIST_REMOVE(mkdir, md_mkdirs);
8862 if (mkdir->md_state & ONWORKLIST)
8863 WORKLIST_REMOVE(&mkdir->md_list);
8864 if (mkdir->md_jaddref != NULL)
8866 WORKITEM_FREE(mkdir, D_MKDIR);
8979 * than a mkdir for the .. entry. We need to cancel it now before
9009 * Cancel the MKDIR_PARENT mkdir component of a diradd when we're going to
9011 * directory. This ensures that we don't simultaneously have a mkdir and
9023 struct mkdir *mkdir;
9033 for (mkdir = LIST_FIRST(&ump->softdep_mkdirlisthd); mkdir;
9034 mkdir = LIST_NEXT(mkdir, md_mkdirs))
9035 if (mkdir->md_diradd == dap && mkdir->md_state & MKDIR_PARENT)
9037 if (mkdir == NULL)
9038 panic("cancel_mkdir_dotdot: Unable to find mkdir\n");
9039 if ((jaddref = mkdir->md_jaddref) != NULL) {
9040 mkdir->md_jaddref = NULL;
9050 if (mkdir->md_state & ONWORKLIST)
9051 WORKLIST_REMOVE(&mkdir->md_list);
9052 mkdir->md_state |= ALLCOMPLETE;
9053 complete_mkdir(mkdir);
9171 * existing MKDIR_PARENT mkdir. If it has already been canceled
11845 * Try to free a mkdir dependency.
11848 complete_mkdir(mkdir)
11849 struct mkdir *mkdir;
11853 if ((mkdir->md_state & ALLCOMPLETE) != ALLCOMPLETE)
11855 LIST_REMOVE(mkdir, md_mkdirs);
11856 dap = mkdir->md_diradd;
11857 dap->da_state &= ~(mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY));
11862 WORKITEM_FREE(mkdir, D_MKDIR);
11866 * Handle the completion of a mkdir dependency.
11869 handle_written_mkdir(mkdir, type)
11870 struct mkdir *mkdir;
11874 if ((mkdir->md_state & (MKDIR_PARENT | MKDIR_BODY)) != type)
11876 mkdir->md_state |= COMPLETE;
11877 complete_mkdir(mkdir);
13727 struct mkdir *mkdir;
13844 mkdir = WK_MKDIR(wk);
13845 if (mkdir->md_jaddref) {
14234 struct mkdir *mkdir;
14241 LIST_FOREACH(mkdir, mkdirlisthd, md_mkdirs) {
14242 diradd = mkdir->md_diradd;
14243 db_printf("mkdir: %p state 0x%X dap %p state 0x%X",
14244 mkdir, mkdir->md_state, diradd, diradd->da_state);
14245 if ((jaddref = mkdir->md_jaddref) != NULL)