Commit Graph

1211 Commits

Author SHA1 Message Date
pooka a1a97722c2 Allow clients to reuse a "park".
Patch from <yamt>, fixes PR kern/44086 by him.
2010-11-12 17:46:09 +00:00
matt 19e6c76b2d Rename rb.h to rbtree.h, as it is more appropriate (c.f. ptree.h). Also
helps find code that hasn't been updated to use the new rbtree API.
2010-09-25 01:42:38 +00:00
rmind 879d5dfb5e Fixes/improvements to RB-tree implementation:
1. Fix inverted node order, so that negative value from comparison operator
   would represent lower (left) node, and positive - higher (right) node.
2. Add an argument (i.e. "context"), passed to comparison operators.
3. Change rb_tree_insert_node() to return a node - either inserted one or
   already existing one.
4. Amend the interface to manipulate the actual object, instead of the
   rb_node (in a similar way as Patricia-tree interface does).
5. Update all RB-tree users accordingly.

XXX: Perhaps rename rb.h to rbtree.h, since cleaning-up..

1-3 address the PR/43488 by Jeremy Huddleston.

Passes RB-tree regression tests.
Reviewed by: matt@, christos@
2010-09-24 22:51:50 +00:00
pgoyette 4973fb4e5e Remove extra char - not sure where that came from (duplicated vi command?)
I really need more caffeine.

Thanks pooka@ for noticing.
2010-08-11 13:26:25 +00:00
pgoyette 24d9c402d1 Keep condvar wmesg's within 8-char limit 2010-08-11 11:43:13 +00:00
mlelstv 2a392db81b Return EINVAL for rename and delete operations to the
root directory instead of the erroneous EROFS.
2010-07-30 16:40:43 +00:00
njoly 9cd958c424 Make sysvbfs rename work for filenames longer than {NAME_MAX}. 2010-07-26 13:43:26 +00:00
hannken 99afd136d0 It makes no sense to call vget() with LK_RETRY. 2010-07-25 09:54:37 +00:00
njoly feeade32b4 Remove bad cast, fix compilation with MSDOSFS_DEBUG. 2010-07-22 18:08:11 +00:00
hannken fb62bef947 Make holding v_interlock mandatory for callers of vget().
Announced some time ago on tech-kern.
2010-07-21 17:52:09 +00:00
hannken f457e09499 Lock the ntnode and recheck the fnode after calling getnewvnode().
Take v_interlock while the ntnode is locked.
2010-07-19 08:17:44 +00:00
njoly a1bce59b7f Fix build with SYSVBFS_VNOPS_DEBUG. 2010-07-17 00:13:42 +00:00
njoly c6aea3ff65 Small typo in comment. 2010-07-16 23:41:01 +00:00
hannken 438de34ae8 Always take the hash list lock before removing a node from the hash chain.
Release the hash list lock before calling getnewvnode() and check the
hash list again like other file systems do.

Take v_interlock before calling vget().
2010-07-16 08:23:28 +00:00
pooka b97a9a0af5 f_namemax is one of the static fields overridden by copy_statvfs_info(),
so be sure to set it to the value coming from the file server as
part of mount args.

exposed, like so many other problems, by njoly's tests
2010-07-15 21:55:05 +00:00
pooka 083df92b14 return same errno as ffs 2010-07-14 16:03:49 +00:00
pooka b79f37ef16 RENAME lookup semantics say return EISDIR if dvp = *vpp for the
last component .... obviously(!!)
2010-07-14 14:07:37 +00:00
pooka fbc9efbb6a Do fhtovp compat translation only for fhtovp ops, not all vfs ops.
Allocate tailing extra buffer for compat op too.
2010-07-11 11:17:27 +00:00
hannken 7296ba383a Replace vget() with vref()/vn_lock(), this node already has a reference. 2010-07-09 08:10:50 +00:00
njoly a28e233447 Do set f_namemax at mount, to provide sensible value for statvfs(2)
calls.
2010-07-07 16:19:55 +00:00
pooka fdc5aef6ab Remove groolingly spooky variable which has been haunting us for
several years without doing anything useful.
2010-07-06 17:00:06 +00:00
pooka 2c9dc3f982 remember to add the new file to the build 2010-07-06 16:13:57 +00:00
pooka b90c150c5e Add compat to enable running puffs in a 64bit time_t kernel against
a server which runs in 32bit time_t namespace.
2010-07-06 13:47:47 +00:00
pooka 6e72f16059 ctassert size of some key structures does not change 2010-07-06 12:28:40 +00:00
pooka 013ecf4f81 Make sure that pa_spare is zero-filled and does not contain any
garbage which might disrupt future use.
2010-07-06 12:05:18 +00:00
pooka e73db95236 union doesn't use layerfs (avoids panic in kernel bootstrap when
union is compiled in but none of the layer-using file systems are).
2010-07-05 21:27:08 +00:00
hannken c2de422c87 LK_INTERLOCK is no longer a valid flag for VOP_LOCK(). 2010-07-02 07:56:46 +00:00
rmind 71cf548ad1 tmpfs_lookup: add comment, de-ident main path. No functional change.
tmpfs_dir_attach: add assert.
2010-07-02 03:29:47 +00:00
hannken 245651a23d Remove vlockmgr(). Generic vnode lock operations now use a rwlock located
in the vnode.  All LK_* flags move from sys/lock.h to sys/vnode.h.  Calls
to vlockmgr() in file systems get replaced with VOP_LOCK() or VOP_UNLOCK().

Welcome to 5.99.34.

Discussed on tech-kern.
2010-07-01 13:00:54 +00:00
hannken e65a328302 The directory vnode must be locked before we call VOP_WHITEOUT().
Should fix PR #23986 "problem mounting directories".
2010-06-30 13:10:35 +00:00
rmind 559464716e tmpfs_bytes_max: use MIN() rather than min(), which returns int.
Spotted by Wolfgang Solfrank.
2010-06-28 19:32:43 +00:00
rmind bf5767dcea tmpfs_statvfs: hold accounting lock, since tmpfs_pages_avail() and
tmpfs_bytes_max() may fluctuate while in calculations.
2010-06-26 03:38:14 +00:00
hannken 1423e65b26 Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
2010-06-24 12:58:48 +00:00
reinoud cd63900e30 Pullup changes from the write implementation:
- remove unnessisary check that would prevent it from mounting newer nilfs
  images. A field has been added in the segment summary.
- store blocks of files on their virtual block number
2010-06-24 12:15:46 +00:00
reinoud 038180ae32 Update NiLFS(2) on-disc structures from Linux version 2010-06-24 10:20:08 +00:00
hannken f6c438ba23 Clean up vnode lock operations:
- VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
   LK_SHARED and LK_NOWAIT.  LK_INTERLOCK is no longer allowed as it
   makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
  LK_EXCLOTHER.  Mark this operation as "diagnostic only".
  Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.
2010-06-24 07:54:46 +00:00
rmind fc8b3b7154 Replace tmpfs_pool custom allocator code with a simpler layer for memory
accounting.  Use wired memory (which can be limited) for meta-data, and
kmem(9) for string allocations.

Close PR/31944.  Fix PR/38361 while here.  OK ad@.
2010-06-22 18:32:07 +00:00
hannken 2c090918c7 Remove the concept of recursive vnode locks by eliminating
vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
Welcome to 5.99.31

Discussed on tech-kern.
2010-06-18 16:29:01 +00:00
pooka eb2a46e827 Install ptyfs userspace header into user's space. 2010-06-14 14:40:47 +00:00
pooka a784ae74af Make retval argument for pathconf a register_t to match VOP_PATHCONF.
This makes the size the same on 64bit archs.  Don't bother bumping
any version, since you'd have explicitly had to jump through some
hoops to use pathconf before.
2010-06-07 11:21:31 +00:00
hannken 62bfdd2b21 Change layered file systems to always pass the locking VOP's down to the
leaf file system.  Remove now unused member v_vnlock from struct vnode.
Welcome to 5.99.30

Discussed on tech-kern.
2010-06-06 08:01:30 +00:00
pooka 704f8889fa Mark files removed in the in-memory structure. This allows us
to do two things:

 1) properly set "recycle?" in inactive
 2) easily check if we are renaming a removed vnode.  without the
    check, it was possible to enter a dirent in the file system for
    a removed (and hence scheduled to be vcleaned) vnode.  this would
    lead to the succesful vget() of a clean vnode.  the use of the
    cleaned vnode was, however, less succesful, except for purposes
    of crashing.
2010-05-27 23:40:12 +00:00
pooka 32de8f7733 Release pathname buffers after use. 2010-05-27 13:22:02 +00:00
pooka c9f42ce961 fix refcounting 2010-05-26 21:27:00 +00:00
pooka 19264c8c5c Initialize *vpp to NULL: relookup() requires it without initializing
the value before the call (yea, changing relookup would probably
be smart, but other file systems already initialize vpp, so I'm
letting someone else experiment with tylenol od).
2010-05-26 17:52:35 +00:00
pooka 2289d19ea3 Don't double unlock fvp if source file disappears during rename.
Problem found by njoly's awesome stresstester.
2010-05-25 10:15:34 +00:00
pooka 33b074be7e add option string for no attribute cache
(foreseeing the odd event I might actually implement one some day)
2010-05-21 11:29:42 +00:00
pooka 40b04abea5 Since libpuffs needs a major bump for extattr support anyway, make
some changes to the user-kernel protocol.  Namely, try to be a
little more resilient some future changes.
2010-05-21 10:40:19 +00:00
pooka b91d2535d9 Support extended attributes. 2010-05-21 10:16:54 +00:00
pooka 18dfe9c831 Fix typo. 2010-05-20 12:09:45 +00:00