Lines Matching refs:fs

104 libuvfs_fid_info_find(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid,
111 rc = avl_find(&fs->fs_name_info_tree, &key, where);
132 libuvfs_name_fs_rdlock(libuvfs_fs_t *fs)
134 (void) rw_rdlock(&fs->fs_name_user_lock);
138 libuvfs_name_fs_wrlock(libuvfs_fs_t *fs)
140 (void) rw_wrlock(&fs->fs_name_user_lock);
144 libuvfs_name_fs_unlock(libuvfs_fs_t *fs)
146 (void) rw_unlock(&fs->fs_name_user_lock);
150 libuvfs_name_fid_rdlock(libuvfs_fs_t *fs, const libuvfs_fid_t *fid)
161 (void) mutex_lock(&fs->fs_name_lock);
162 info = libuvfs_fid_info_find(fs, fid, NULL);
163 (void) mutex_unlock(&fs->fs_name_lock);
173 libuvfs_name_fid_wrlock(libuvfs_fs_t *fs, const libuvfs_fid_t *fid)
178 (void) mutex_lock(&fs->fs_name_lock);
179 info = libuvfs_fid_info_find(fs, fid, NULL);
180 (void) mutex_unlock(&fs->fs_name_lock);
190 libuvfs_name_fid_unlock(libuvfs_fs_t *fs, const libuvfs_fid_t *fid)
200 (void) mutex_lock(&fs->fs_name_lock);
201 info = libuvfs_fid_info_find(fs, fid, NULL);
203 (void) mutex_unlock(&fs->fs_name_lock);
208 (void) mutex_unlock(&fs->fs_name_lock);
214 libuvfs_name_root_create(libuvfs_fs_t *fs, const libuvfs_fid_t *rootfid)
219 (void) mutex_lock(&fs->fs_name_lock);
221 root = libuvfs_fid_info_find(fs, rootfid, &where);
223 (void) mutex_unlock(&fs->fs_name_lock);
228 avl_insert(&fs->fs_name_info_tree, root, where);
230 (void) mutex_unlock(&fs->fs_name_lock);
244 libuvfs_name_store(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid,
253 (void) mutex_lock(&fs->fs_name_lock);
255 dir = libuvfs_fid_info_find(fs, dirfid, &where);
257 (void) mutex_unlock(&fs->fs_name_lock);
261 child = libuvfs_fid_info_find(fs, childfid, &where);
264 avl_insert(&fs->fs_name_info_tree, child, where);
299 (void) mutex_unlock(&fs->fs_name_lock);
308 libuvfs_name_delete(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid,
311 libuvfs_name_store(fs, dirfid, name, NULL, B_TRUE, oldfid);
319 libuvfs_name_lookup(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid,
325 (void) mutex_lock(&fs->fs_name_lock);
328 dir = libuvfs_fid_info_find(fs, dirfid, NULL);
332 (void) mutex_unlock(&fs->fs_name_lock);
341 libuvfs_name_parent(libuvfs_fs_t *fs, const libuvfs_fid_t *fid, int index,
348 (void) mutex_lock(&fs->fs_name_lock);
350 me = libuvfs_fid_info_find(fs, fid, NULL);
371 (void) mutex_unlock(&fs->fs_name_lock);
381 libuvfs_name_dirent(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid, int index,
388 (void) mutex_lock(&fs->fs_name_lock);
389 dir = libuvfs_fid_info_find(fs, dirfid, NULL);
390 (void) mutex_unlock(&fs->fs_name_lock);
415 libuvfs_name_dirent_next(libuvfs_fs_t *fs, const libuvfs_fid_t *dirfid,
422 (void) mutex_lock(&fs->fs_name_lock);
423 dir = libuvfs_fid_info_find(fs, dirfid, NULL);
424 (void) mutex_unlock(&fs->fs_name_lock);
448 libuvfs_name_count(libuvfs_fs_t *fs, const libuvfs_fid_t *fid)
453 (void) mutex_lock(&fs->fs_name_lock);
455 child = libuvfs_fid_info_find(fs, fid, NULL);
464 (void) mutex_unlock(&fs->fs_name_lock);
498 libuvfs_name_path(libuvfs_fs_t *fs, const libuvfs_fid_t *fid,
505 (void) mutex_lock(&fs->fs_name_lock);
507 fnode = libuvfs_fid_info_find(fs, fid, NULL);
526 (void) mutex_unlock(&fs->fs_name_lock);
583 libuvfs_name_fs_construct(libuvfs_fs_t *fs)
585 (void) rwlock_init(&fs->fs_name_user_lock, USYNC_THREAD, NULL);
586 avl_create(&fs->fs_name_info_tree, libuvfs_fid_info_compare,
592 libuvfs_name_fs_destroy(libuvfs_fs_t *fs)
594 avl_destroy(&fs->fs_name_info_tree);
595 (void) rwlock_destroy(&fs->fs_name_user_lock);
599 libuvfs_name_fs_free(libuvfs_fs_t *fs)
605 while ((dir = avl_destroy_nodes(&fs->fs_name_info_tree, &cookie))