summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs/tmpfs.h
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-11-18 04:52:40 +0000
committerdelphij <delphij@FreeBSD.org>2007-11-18 04:52:40 +0000
commitc5d6580fd4b8e519f78c87346bdba7fc4637452b (patch)
tree9a3aa658a087f9d1188ba73686fc05b714847d07 /sys/fs/tmpfs/tmpfs.h
parentb0d971c673423f9db4d4c3a4e8ab7f2099487302 (diff)
downloadFreeBSD-src-c5d6580fd4b8e519f78c87346bdba7fc4637452b.zip
FreeBSD-src-c5d6580fd4b8e519f78c87346bdba7fc4637452b.tar.gz
MFp4: Several fixes to tmpfs which makes it to survive from pho@'s
strees2 suite, to quote his letter, this change: 1. It removes the tn_lookup_dirent stuff. I think this cannot be fixed, because nothing protects vnode/tmpfs node between lookup is done, and actual operation is performed, in the case the vnode lock is dropped. At least, this is the case with the from vnode for rename. For now, we do the linear lookup in the parent node. This has its own drawbacks. Not mentioning speed (that could be fixed by using hash), the real problem is the situation where several hardlinks exist in the dvp. But, I think this is fixable. 2. The patch restores the VV_ROOT flag on the root vnode after it became reclaimed and allocated again. This fixes MPASS assertion at the start of the tmpfs_lookup() reported by many. Submitted by: kib
Diffstat (limited to 'sys/fs/tmpfs/tmpfs.h')
-rw-r--r--sys/fs/tmpfs/tmpfs.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h
index b623514..d730e9e 100644
--- a/sys/fs/tmpfs/tmpfs.h
+++ b/sys/fs/tmpfs/tmpfs.h
@@ -238,12 +238,6 @@ struct tmpfs_node {
* allocated for it or it has been reclaimed). */
struct vnode * tn_vnode;
- /* Pointer to the node returned by tmpfs_lookup() after doing a
- * delete or a rename lookup; its value is only valid in these two
- * situations. In case we were looking up . or .., it holds a null
- * pointer. */
- struct tmpfs_dirent * tn_lookup_dirent;
-
/* interlock to protect tn_vpstate */
struct mtx tn_interlock;
@@ -425,6 +419,8 @@ void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *);
void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *);
struct tmpfs_dirent * tmpfs_dir_lookup(struct tmpfs_node *node,
struct componentname *cnp);
+struct tmpfs_dirent *tmpfs_dir_search(struct tmpfs_node *node,
+ struct tmpfs_node *f);
int tmpfs_dir_getdotdent(struct tmpfs_node *, struct uio *);
int tmpfs_dir_getdotdotdent(struct tmpfs_node *, struct uio *);
struct tmpfs_dirent * tmpfs_dir_lookupbycookie(struct tmpfs_node *, off_t);
OpenPOWER on IntegriCloud