2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * If we get here, we're freeing info when it still has 2N/A * libuvfs_name_dirent_t objects pointing to it; i.e., 2N/A * it's like freeing a file before all of its names are 2N/A * gone. This can happen via libuvfs_destroy_fs, when 2N/A * all libuvfs_fid_info_t objects are destroyed in 2N/A * We drop fs_name_lock before we enter nm_user_lock. We do 2N/A * this to avoid lock order problems. It should be safe, since 2N/A * at present, libuvfs_fid_info_t structures are never freed. 2N/A * If that ever changes, we will need to be sure that info does 2N/A * not disappear before we dereference it. 2N/A /* See comment in libuvfs_name_fid_rdlock() about the locking below */ 2N/A * We hold fs_name_lock across the dropping of nm_user_lock. This 2N/A * is different than the two functions above, where we acquire 2N/A * nm_user_lock. This is because there is no risk of getting 2N/A * stuck before dropping fs_name_lock. 2N/A * Store childfid in the directory specified by dirfid under the given 2N/A * name. If overwrite is nonzero, the previous fid (if any) is overwritten. 2N/A * If oldfid is not NULL, return the previous fid; the uvfid_len is set 2N/A * to NULL if there is no previous fid. 2N/A * If childfid is NULL, and overwrite is true, then this function will 2N/A * delete (although you could also call libuvfs_name_delete). 2N/A * Delete the fid in the given dirfid for the given name. If oldfid is 2N/A * not NULL, then the previous fid (if any) is put there. 2N/A * Retrieve the fid for the given dirfid and the given name. 2N/A * Return the parent fid for the given directory fid. The index parameter 2N/A * indicates which hard link to follow; normally, index is zero. 2N/A * Retrieve the fid and name for the "index"th entry in the given directory. 2N/A * Given a directory and an existing name, retrieve the next name and fid 2N/A * from that directory. Note that directories are sorted by name. 2N/A * Count the number of names a fid appears in, i.e. the number of known 2N/A * Determine a path for a given fid. The index parameter specifies which 2N/A * hard link to find the path for; it is normally zero.