Lines Matching refs:to

72 	// It may be chosen with respect to the available memory or enhanced
99 /** \brief Structure to manage a mounted file system
104 (e.g. by holding a reference to a vnode of that mount) (read) access
105 to those fields is always safe, even without additional locking. Morever
106 while mounted the mount holds a reference to the covers_vnode, and thus
108 reference to vnode is held (note that for the root mount covers_vnode
130 * The holder is allowed to read/write access the sMountsTable.
146 * The thread trying to lock the lock must not hold sVnodeMutex or
153 * The holder is allowed to read access the vnode::covered_by field of any
156 * The thread trying to lock the must not hold sVnodeMutex.
162 * The holder is allowed to read/write access sVnodeTable and to
163 * to any unbusy vnode in that table, save
164 * to the immutable fields (device, id, private_node, mount) to which
165 * only read-only access is allowed, and to the field covered_by, which is
168 * The thread trying to lock the mutex must not hold sMountMutex.
478 /** Tries to open the specified file system module.
480 * Returns a pointer to file system module interface, or NULL if it
505 * The name is allocated for you, and you have to free() it when you're
516 // the name already seems to be the module's file name
523 // this doesn't seem to be a valid name, but well...
605 // add the vnode to the mount structure
663 * if the counter dropped to 0.
665 * The caller must, of course, own a reference to the vnode to call this
691 // to delete it
720 * The caller must either already have a reference to the vnode or hold
765 * \param _vnode Pointer to a vnode* variable into which the pointer to the
786 // vnode doesn't seem to become unbusy
796 TRACE(("get_vnode: tried to lookup vnode, got %p\n", vnode));
808 // we need to create a new vnode and read it in
852 * if the counter dropped to 0.
854 * The caller must, of course, own a reference to the vnode to call this
877 * TODO: there is currently no means to stop a blocking read/write!
887 /** \brief Resolves a mount point vnode to the volume root vnode it is covered
891 * by the root of a volume. If it is the function obtains a reference to the
918 /** \brief Resolves a mount point vnode to the volume root vnode it is covered
932 * \param resolvedMountID Pointer to storage for the resolved mount ID.
933 * \param resolvedNodeID Pointer to storage for the resolved node ID.
966 /** \brief Resolves a volume root vnode to the underlying mount point vnode.
970 * a reference to the underlying mount point node and returns it.
997 * The supplied \a path is transformed to refer to the directory part of
1000 * Neither the returned path nor the leaf name can be expected to be
1003 * \param path The path to be analyzed. Must be able to store at least one
1087 component. This function clobbers the buffer pointed to by \a path only
1116 // walk to find the next path component ("path" will point to a single
1127 // See if the '..' is at the root of a mount and move to the covered
1128 // vnode so we pass the '..' path to the underlying filesystem
1138 // Check if we have the right to search the current directory vnode.
1144 // Tell the filesystem to get the vnode of this path component (if we got the
1154 // If the new node is a symbolic link, resolve it (if we've been told to do it)
1196 // directory ("vnode" still points to that one).
1257 // figure out if we need to start at root or at cwd
1285 /** Returns the vnode in the next to last segment of the path, and returns
1287 * The path buffer must be able to store at least one additional character.
1302 * to by a FD + path pair.
1305 * case \a path is either an absolute path or one relative to the current
1307 * of the directory referred to by \a fd. If \a path is absolute \a fd is
1310 * The caller has the responsibility to call put_vnode() on the returned
1317 * \param _vnode A pointer to a variable the directory vnode shall be written
1353 // See if vnode is the root of a mount and move to the covered
1419 /** Gets the full path to a given directory vnode.
1420 * It uses the fs_get_vnode_name() call to get the name of a vnode; if a
1421 * file system doesn't support this call, it will fall back to iterating
1422 * through the parent directory to get the name of the child.
1428 * It doesn't use any locking to prevent returning the correct path, as
1429 * paths aren't safe anyway: the path to a file can change at any time.
1431 * It might be a good idea, though, to check if the returned path exists
1443 /* this implementation is currently bound to FSSH_B_PATH_NAME_LENGTH */
1458 // resolve a volume root to its mount point
1482 // resolve a volume root to its mount point
1504 // ToDo: add an explicit check for loops in about 10 levels to do
1507 // don't go deeper as 'maxLevel' to prevent circular loops
1531 // copy the path to the output buffer
1546 * The given path buffer must be able to store at least one
1551 check_path(char *to)
1557 while (*to) {
1559 if (*to == '/')
1560 to++, length++;
1562 begin = to;
1563 while (*to != '/' && *to)
1564 to++, length++;
1566 if (to - begin > FSSH_B_FILE_NAME_LENGTH)
1575 if (*(to - 1) == '/') {
1579 to[0] = '.';
1580 to[1] = '\0';
1600 // if this is still valid to do (accessing the vnode without ref_count
1655 // there is no relative path to take into account
1727 and calls the file system hooks to read/write the request to disk.
1737 // to access the file outside of its bounds
1785 // first, find out where we have to continue in our iovecs
1817 // (fileLeft) has been assigned to tempVecs
1820 // assign what is left of the current fileVec to the tempVecs
1823 // try to satisfy one iovec per iteration (or as much as
1995 // If this is a layered FS, we need to get the node cookie for the requested
2002 fssh_panic("get_vnode(): Failed to get super node for vnode %p, "
2175 // check how much the iovecs allow us to read
2182 // We're supposed to read less than specified by the vecs. Since
2183 // readv_pos() doesn't support this, we need to clone the vecs.
2216 // check how much the iovecs allow us to write
2223 // We're supposed to write less than specified by the vecs. Since
2224 // writev_pos() doesn't support this, we need to clone the vecs.
2304 /** Acquires another reference to the vnode that has to be released
2429 * to the node.
2474 // vnode_path_to_vnode() releases a reference to the starting vnode
2489 // Use get_vnode() to resolve the cookie for the right layer.
2497 /** Finds the full path to the file that contains the module \a moduleName,
2549 // vnode_path_to_vnode() has already released the reference to dir
2574 // if we got here, the moduleName just pointed to a directory, not to
2586 * The path must refer to an existing or non-existing entry in an existing
2588 * refer to an existing directory.
2594 * Any two paths referring to the same entry, will result in the same
2598 * \param path The path to be normalized.
2602 * otherwise that of the team this thread belongs to. Only relevant,
2603 * if the path is relative (to get the CWD).
2616 // copy the supplied path to the stack, so it can be modified
2630 TRACE(("vfs_normalize_path(): failed to get dir vnode: %s\n", strerror(error)));
2640 TRACE(("vfs_normalize_path(): failed to get dir vnode for \".\" or \"..\": %s\n",
2649 TRACE(("vfs_normalize_path(): failed to get dir path: %s\n", strerror(error)));
3084 // get directory to put the new file in
3105 // get directory to put the new file in
3160 // put only on error -- otherwise our reference was transferred to the FD
3402 // we need to replace d_dev and d_ino with the actual values.
3409 // ".." is guaranteed to to be clobbered by this call
3448 // we need to adjust the read dirents
3478 // we need to make sure our path name doesn't stop with "/", ".", or ".."
3571 // we only accept changes to FSSH_O_APPEND and FSSH_O_NONBLOCK
3656 // We need to set the locking atomically - someone
3684 // We need to set the locking atomically - someone
3725 // path validity checks have to be in the calling function!
3750 // path validity checks have to be in the calling function!
4266 FUNCTION(("attr_rename: from fd = %d, from name = \"%s\", to fd = %d, to name = \"%s\", kernel %d\n", fromfd, fromName, tofd, toName, kernel));
4563 // The path is always safe, we just have to make sure that fsName is
4576 // point to a real file/device (if given at all).
4589 // correct path to file device
4687 // the root node is supposed to be owned by the file system - it must
4758 // grab the vnode master mutex to keep someone from creating
4771 // The root vnode ref_count needs to be 2 here: one for the file
4798 // from getting back to zero, this will fall into an endless loop...
4803 // the file system is still busy - but we're forced to unmount it,
4843 // we don't have to do this.
4885 // synchronize access to vnode list
4900 // acquire a reference to the vnode
4910 // but this vnode won't go away since we keep a reference to it.
4913 fssh_dprintf("syncing of mount %d stopped due to vnode %"
4940 // fill in info the file system doesn't (have to) know about
5051 // nope, can't cwd to here
5168 * \return A FD referring to the newly opened node, or an error code,
5191 * \a inode identify the parent directory of the directory to be opened
5195 * directory of the directory to be opened resides on, otherwise
5198 * directory of the directory to be opened, otherwise node ID of the
5200 * \param name The entry name of the directory to be opened. If \c NULL,
5201 * the \a device + \a inode pair identify the node to be opened.
5223 * \return A FD referring to the newly opened directory, or an error code,
5314 /** \brief Reads the contents of a symlink referred to by a FD + path pair.
5317 * If only \a fd is given, the function the symlink to be read is the node
5319 * symlink to be read. If both are given and the path is absolute, \a fd is
5323 * will still be updated to reflect the required buffer size.
5329 * \param _bufferSize A pointer to the size of the supplied buffer.
5399 * to be deleted). If only a path is given, this path identifies the entry
5421 /** \brief Moves an entry specified by a FD + path pair to a an entry specified
5468 * given, this path identifies the entry for whose node to retrieve the
5477 * function shall not stick to symlinks, but traverse them.
5502 // path given: get the stat of the node referred to by (fd, path)
5535 * given, this path identifies the entry for whose node to write the
5544 * function shall not stick to symlinks, but traverse them.
5545 * \param stat The buffer containing the stat data to be written.
5572 // path given: write the stat of the node referred to by (fd, path)
5673 // Call vfs to get current working directory
5699 // The partition argument should point to a real file/device.