Lines Matching refs:error

96 	int			error;  in xchk_setup_dirtree()  local
101 error = xrep_setup_dirtree(sc); in xchk_setup_dirtree()
102 if (error) in xchk_setup_dirtree()
103 return error; in xchk_setup_dirtree()
120 error = xfarray_create(descr, 0, sizeof(struct xchk_dirpath_step), in xchk_setup_dirtree()
123 if (error) in xchk_setup_dirtree()
127 error = xfblob_create(descr, &dl->path_names); in xchk_setup_dirtree()
129 if (error) in xchk_setup_dirtree()
132 error = xchk_setup_inode_contents(sc, 0); in xchk_setup_dirtree()
133 if (error) in xchk_setup_dirtree()
147 return error; in xchk_setup_dirtree()
166 int error; in xchk_dirpath_append() local
175 error = xfblob_storename(dl->path_names, &step.name_cookie, name); in xchk_dirpath_append()
176 if (error) in xchk_dirpath_append()
177 return error; in xchk_dirpath_append()
179 error = xino_bitmap_set(&path->seen_inodes, ip->i_ino); in xchk_dirpath_append()
180 if (error) in xchk_dirpath_append()
181 return error; in xchk_dirpath_append()
183 error = xfarray_append(dl->path_steps, &step); in xchk_dirpath_append()
184 if (error) in xchk_dirpath_append()
185 return error; in xchk_dirpath_append()
219 int error; in xchk_dirtree_create_path() local
224 error = xfs_parent_from_attr(sc->mp, attr_flags, name, namelen, value, in xchk_dirtree_create_path()
226 if (error) in xchk_dirtree_create_path()
227 return error; in xchk_dirtree_create_path()
251 error = xchk_dirpath_append(dl, sc->ip, path, &xname, rec); in xchk_dirtree_create_path()
252 if (error) in xchk_dirtree_create_path()
264 return error; in xchk_dirtree_create_path()
283 int error; in xchk_dirpath_revalidate() local
290 error = xfs_parent_lookup(sc->tp, sc->ip, &dl->xname, &dl->pptr_rec, in xchk_dirpath_revalidate()
292 if (error == -ENOATTR) { in xchk_dirpath_revalidate()
299 return error; in xchk_dirpath_revalidate()
319 int error; in xchk_dirpath_find_next_step() local
324 error = xfs_parent_from_attr(sc->mp, attr_flags, name, namelen, value, in xchk_dirpath_find_next_step()
326 if (error) in xchk_dirpath_find_next_step()
327 return error; in xchk_dirpath_find_next_step()
372 int error; in xchk_dirpath_step_up() local
375 error = xchk_iget(sc, parent_ino, &dp); in xchk_dirpath_step_up()
376 if (error) in xchk_dirpath_step_up()
377 return error; in xchk_dirpath_step_up()
383 error = -ESTALE; in xchk_dirpath_step_up()
390 error = 0; in xchk_dirpath_step_up()
400 error = 0; in xchk_dirpath_step_up()
411 error = 0; in xchk_dirpath_step_up()
419 error = -EFSCORRUPTED; in xchk_dirpath_step_up()
427 error = -EFSCORRUPTED; in xchk_dirpath_step_up()
435 error = -EFSCORRUPTED; in xchk_dirpath_step_up()
443 error = -EFSCORRUPTED; in xchk_dirpath_step_up()
452 error = -EBUSY; in xchk_dirpath_step_up()
465 error = xchk_xattr_walk(sc, dp, xchk_dirpath_find_next_step, NULL, dl); in xchk_dirpath_step_up()
467 if (error == -EFSCORRUPTED || error == -EMLINK || in xchk_dirpath_step_up()
468 (!error && dl->parents_found == 0)) { in xchk_dirpath_step_up()
476 error = 0; in xchk_dirpath_step_up()
479 if (error) in xchk_dirpath_step_up()
483 error = -ESTALE; in xchk_dirpath_step_up()
491 error = xchk_dirpath_append(dl, dp, path, &dl->xname, &dl->pptr_rec); in xchk_dirpath_step_up()
492 if (error) in xchk_dirpath_step_up()
502 return error; in xchk_dirpath_step_up()
521 int error; in xchk_dirpath_walk_upwards() local
526 error = xchk_dirpath_revalidate(dl, path); in xchk_dirpath_walk_upwards()
527 if (error) in xchk_dirpath_walk_upwards()
528 return error; in xchk_dirpath_walk_upwards()
561 error = xchk_dirpath_step_up(dl, path, is_metadir); in xchk_dirpath_walk_upwards()
562 if (error) { in xchk_dirpath_walk_upwards()
565 return error; in xchk_dirpath_walk_upwards()
573 while (!error && path->outcome == XCHK_DIRPATH_SCANNING) in xchk_dirpath_walk_upwards()
574 error = xchk_dirpath_step_up(dl, path, is_metadir); in xchk_dirpath_walk_upwards()
579 if (error == -EFSCORRUPTED) { in xchk_dirpath_walk_upwards()
581 error = 0; in xchk_dirpath_walk_upwards()
583 if (!error && dl->stale) in xchk_dirpath_walk_upwards()
585 return error; in xchk_dirpath_walk_upwards()
603 int error; in xchk_dirpath_step_is_stale() local
605 error = xfarray_load(dl->path_steps, step_idx, &step); in xchk_dirpath_step_is_stale()
606 if (error) in xchk_dirpath_step_is_stale()
607 return error; in xchk_dirpath_step_is_stale()
624 error = xfblob_loadname(dl->path_names, step.name_cookie, in xchk_dirpath_step_is_stale()
626 if (error) in xchk_dirpath_step_is_stale()
627 return error; in xchk_dirpath_step_is_stale()
764 int error; in xchk_dirtree_load_path() local
766 error = xfarray_load(dl->path_steps, path->first_step, &step); in xchk_dirtree_load_path()
767 if (error) in xchk_dirtree_load_path()
768 return error; in xchk_dirtree_load_path()
770 error = xfblob_loadname(dl->path_names, step.name_cookie, &dl->xname, in xchk_dirtree_load_path()
772 if (error) in xchk_dirtree_load_path()
773 return error; in xchk_dirtree_load_path()
792 int error = 0; in xchk_dirtree_find_paths_to_root() local
795 if (xchk_should_terminate(sc, &error)) in xchk_dirtree_find_paths_to_root()
796 return error; in xchk_dirtree_find_paths_to_root()
815 error = xchk_xattr_walk(sc, sc->ip, xchk_dirtree_create_path, in xchk_dirtree_find_paths_to_root()
817 if (error) in xchk_dirtree_find_paths_to_root()
818 return error; in xchk_dirtree_find_paths_to_root()
822 error = xchk_dirtree_load_path(dl, path); in xchk_dirtree_find_paths_to_root()
823 if (error) in xchk_dirtree_find_paths_to_root()
824 return error; in xchk_dirtree_find_paths_to_root()
831 error = xchk_dirpath_walk_upwards(dl, path); in xchk_dirtree_find_paths_to_root()
832 if (error == -EFSCORRUPTED) { in xchk_dirtree_find_paths_to_root()
839 if (error == -ESTALE) { in xchk_dirtree_find_paths_to_root()
844 if (error) in xchk_dirtree_find_paths_to_root()
845 return error; in xchk_dirtree_find_paths_to_root()
851 return error; in xchk_dirtree_find_paths_to_root()
915 int error; in xchk_dirtree() local
944 error = xfs_dir_hook_add(sc->mp, &dl->dhook); in xchk_dirtree()
945 if (error) in xchk_dirtree()
951 error = xchk_dirtree_find_paths_to_root(dl); in xchk_dirtree()
952 if (error == -EFSCORRUPTED || error == -ELNRNG || error == -ENOSR) { in xchk_dirtree()
959 error = 0; in xchk_dirtree()
962 if (error == -EBUSY) { in xchk_dirtree()
969 error = 0; in xchk_dirtree()
972 if (error) in xchk_dirtree()
994 trace_xchk_dirtree_done(sc->ip, sc->sm, error); in xchk_dirtree()
995 return error; in xchk_dirtree()