/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <strings.h>
#include <libuvfs_impl.h>
static libuvfs_name_dirent_t *
const libuvfs_fid_t *childfid)
{
return (rc);
}
static void
{
}
static libuvfs_fid_info_t *
{
return (rc);
}
static void
{
void *cookie;
/*
* If we get here, we're freeing info when it still has
* libuvfs_name_dirent_t objects pointing to it; i.e.,
* it's like freeing a file before all of its names are
* gone. This can happen via libuvfs_destroy_fs, when
* all libuvfs_fid_info_t objects are destroyed in
* fid order.
*/
}
}
static libuvfs_fid_info_t *
{
return (rc);
}
static libuvfs_name_dirent_t *
{
return (rc);
}
void
{
}
void
{
}
void
{
}
int
{
/*
* We drop fs_name_lock before we enter nm_user_lock. We do
* this to avoid lock order problems. It should be safe, since
* at present, libuvfs_fid_info_t structures are never freed.
* If that ever changes, we will need to be sure that info does
* not disappear before we dereference it.
*/
return (-1);
return (0);
}
int
{
/* See comment in libuvfs_name_fid_rdlock() about the locking below */
return (-1);
return (0);
}
int
{
/*
* We hold fs_name_lock across the dropping of nm_user_lock. This
* is different than the two functions above, where we acquire
* nm_user_lock. This is because there is no risk of getting
* stuck before dropping fs_name_lock.
*/
return (-1);
}
return (0);
}
void
{
return;
}
}
/*
* Store childfid in the directory specified by dirfid under the given
* name. If overwrite is nonzero, the previous fid (if any) is overwritten.
* If oldfid is not NULL, return the previous fid; the uvfid_len is set
* to NULL if there is no previous fid.
*
* If childfid is NULL, and overwrite is true, then this function will
* delete (although you could also call libuvfs_name_delete).
*/
void
{
return;
}
}
} else {
}
else
}
}
} else if (overwrite) {
} else {
}
}
}
/*
* Delete the fid in the given dirfid for the given name. If oldfid is
* not NULL, then the previous fid (if any) is put there.
*/
void
{
}
/*
* Retrieve the fid for the given dirfid and the given name.
*/
void
{
}
/*
* Return the parent fid for the given directory fid. The index parameter
* indicates which hard link to follow; normally, index is zero.
*/
int
{
goto out;
}
if (index-- <= 0)
break;
goto out;
}
out:
if (found)
else
return (found);
}
/*
* Retrieve the fid and name for the "index"th entry in the given directory.
*/
{
goto out;
if (--index < 0)
break;
goto out;
out:
return (namelen);
}
/*
* Given a directory and an existing name, retrieve the next name and fid
* from that directory. Note that directories are sorted by name.
*/
{
goto out;
goto out;
goto out;
out:
return (namelen);
}
/*
* Count the number of names a fid appears in, i.e. the number of known
* hard links.
*/
{
++count;
}
return (count);
}
static uint32_t
{
}
out:
return (need);
}
/*
* Determine a path for a given fid. The index parameter specifies which
* hard link to find the path for; it is normally zero.
*/
{
goto out;
while (index-- > 0)
goto out;
goto out;
out:
return (need);
}
static int
{
const libuvfs_name_dirent_t *a = va;
const libuvfs_name_dirent_t *b = vb;
int rc;
if (rc < 0)
return (-1);
if (rc > 0)
return (1);
return (0);
}
/*ARGSUSED*/
static int
{
de_dirnode));
return (0);
}
/*ARGSUSED*/
static void
{
}
static int
{
const libuvfs_fid_info_t *a = va;
const libuvfs_fid_info_t *b = vb;
}
void
{
nm_fs_avl));
}
void
{
}
void
{
void *cookie;
!= NULL)
}
#pragma init(libuvfs_name_init)
static void
libuvfs_name_init(void)
{
sizeof (libuvfs_fid_info_t), 0,
umem_cache_create("libuvfs_name_dirent_cache",
sizeof (libuvfs_name_dirent_t), 0,
}
#pragma fini(libuvfs_name_fini)
static void
libuvfs_name_fini(void)
{
}