Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/zfs/zfsimpl.c
Show First 20 Lines • Show All 2,328 Lines • ▼ Show 20 Lines | zfs_lookup(const struct zfsmount *mount, const char *upath, dnode_phys_t *dnode) | ||||
uint64_t objnum; | uint64_t objnum; | ||||
const spa_t *spa; | const spa_t *spa; | ||||
dnode_phys_t dn; | dnode_phys_t dn; | ||||
const char *p, *q; | const char *p, *q; | ||||
char element[256]; | char element[256]; | ||||
char path[1024]; | char path[1024]; | ||||
int symlinks_followed = 0; | int symlinks_followed = 0; | ||||
struct stat sb; | struct stat sb; | ||||
struct obj_list *entry; | struct obj_list *entry, *tentry; | ||||
STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache); | STAILQ_HEAD(, obj_list) on_cache = STAILQ_HEAD_INITIALIZER(on_cache); | ||||
spa = mount->spa; | spa = mount->spa; | ||||
if (mount->objset.os_type != DMU_OST_ZFS) { | if (mount->objset.os_type != DMU_OST_ZFS) { | ||||
printf("ZFS: unexpected object set type %ju\n", | printf("ZFS: unexpected object set type %ju\n", | ||||
(uintmax_t)mount->objset.os_type); | (uintmax_t)mount->objset.os_type); | ||||
return (EIO); | return (EIO); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 131 Lines • ▼ Show 20 Lines | if (S_ISLNK(sb.st_mode)) { | ||||
free(entry); | free(entry); | ||||
} | } | ||||
objnum = (STAILQ_FIRST(&on_cache))->objnum; | objnum = (STAILQ_FIRST(&on_cache))->objnum; | ||||
} | } | ||||
} | } | ||||
*dnode = dn; | *dnode = dn; | ||||
done: | done: | ||||
STAILQ_FOREACH(entry, &on_cache, entry) | STAILQ_FOREACH_SAFE(entry, &on_cache, entry, tentry) | ||||
free(entry); | free(entry); | ||||
return (rc); | return (rc); | ||||
} | } |