Commit Graph

1194 Commits

Author SHA1 Message Date
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
reinoud bb702d3252 As per change in NiLFS2 spec, select the superblocks on highest checksum
number and not on their timestamp since one of the timestamps could be wrong when the
clock was set wrong for whatever reason.
2010-05-01 21:21:27 +00:00
pooka eb097b1b96 Return correct value from union_islocked.
(XXX: anything asserting LK_SHARED will fail because union doesn't
support shared locks)
2010-05-01 10:44:59 +00:00
pooka 0c20c076ce Enforce RLIMIT_FSIZE before VOP_WRITE. This adds support to file
system drivers where it was missing from and fixes one buggy
implementation.  The arguably weird semantics of the check are
maintained (v_size vs. va_bytes, overwrite).
2010-04-23 15:38:46 +00:00
pooka 4fe640bd4d polish previous 2010-04-13 10:12:43 +00:00
pooka b0e7c8b4f9 If getdisksize() fails (happens e.g. on fss block devices), don't
give up if we don't really need the information provided by it.
2010-04-13 10:11:08 +00:00
mlelstv c243552ba3 The *_modcmd functions use the module name as prefix. 2010-04-11 10:26:25 +00:00
pooka 024c6fe985 Make module name match MOUNT_NAME. Inspired by PR kern/43110. 2010-04-11 06:36:25 +00:00
hannken 9b0618f1e4 Add file system suspension support (vfs_suspend(9)) to msdosfs.
Reviewed by: Antti Kantee <pooka@netbsd.org>
2010-04-09 08:09:18 +00:00
pooka 997a4cfc3c In genfs where available.
The only functional change is mknod now returning EOPNOTSUPP instead
of EINVAL.  I make this sacrifice willingly and with a clean conscience.
2010-04-08 16:04:35 +00:00
pooka ed7e284d5c Use genfs instead of homegrown stuff where possible. 2010-04-08 15:03:33 +00:00
pooka c8dcca6644 * Don't care about VOP_CLOSE() error in unmount. In the extremely
unlike event it did fail, the kernel would double lutz to doom
  (in failure devvp now remains unmountable until reboot.  fans
  of complicated & untested error branches may attempt to gunk this
  up.  i'm not one of them).
* cosmetic surgery: cut extra ;
2010-04-07 15:19:09 +00:00
pooka 242bf1c3e7 Stop exposing fifofs internals and leave only fifo_vnodeop_p visible. 2010-03-29 13:11:32 +00:00
pooka 6f6b6bc6df \n, police! 2010-03-27 02:37:34 +00:00
pooka 4f49fb9915 Don't generate unused fs_thefs.h headers. 2010-03-02 16:43:48 +00:00
snj ccaf1e96be Fight the ever-increasing size of src checkouts by spelling "useful"
without an extra l.
2010-02-28 15:52:16 +00:00
reinoud 28b2fc3a6f Typo and style 2010-02-26 09:57:39 +00:00
reinoud 1196d96d39 First part of shrinking/growing metadata partition support:
- extending the metadata partition

Still to follow:
- sparsify metadata partition
- growing the metadata partition
- unsparsifying metadata partition
2010-02-25 16:15:57 +00:00