Commit Graph

1171 Commits

Author SHA1 Message Date
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
reinoud e1abb93a90 Rename metadata partition parameters to be less generic and add the flags. 2010-02-24 19:20:13 +00:00
reinoud a8903501c1 Extract UDF metadata partition parameters as already done for VAT and sparable
partitions.
2010-02-24 19:14:12 +00:00
pooka 65dca8eead * add a rant about why MPSAFE isn't enabled even though puffs code is
* predict_false that we are mounting when calling statvfs
* KNF
2010-02-17 14:32:08 +00:00
mlelstv ba0d32752c Replace individual queries for partition information with
new helper function.
2010-01-31 10:30:40 +00:00
mlelstv 61ec757e43 Drop two uses of disk label data.
msdosfs and cd9660 are the only filesystems that verify the filesystem
type in the label. This is the wrong place, sanity checks should only
rely on the inner structure of the filesystem (like signatures or
magic numbers).

msdosfs also used the device type information from the label to
deduce a filesystem parameter heuristically for the gemdos variant.
If there is no information inside the filesystem data itself, this
should be an explicit mount option.
2010-01-26 21:29:48 +00:00
joerg 816eaf9482 On broken filesystems the fillinmap inner loop may have never read a
block, so don't try to release it if bp==NULL.
2010-01-26 20:25:52 +00:00
mlelstv 02346e9564 Fetch sector size also from wedges. 2010-01-25 15:30:44 +00:00
pooka 3557ef52b9 In case the operations thread has exited, do not queue any more
operations.  This prevents kernel memory leaks (one of which happened
every time the file system was unmounted via PUFFSOP_UNMOUNT ...
and incidentally would've been trivially caught with the old
malloc(9) interface.  I wonder if the message is to use a ton of
pools instead of regression-attractive kmem interface).
2010-01-14 19:50:07 +00:00
pooka 50df98fe44 Since VOP_GETATTR() does not require a locked vnode, resolve and
reference the puffs_node before sending the request to the file
server.  This diminishes the window where the inode can be reclaimed
and be invalidated before it is accessed (but does not completely
eliminate the race, as that is a caller problem which we cannot
fix here).
2010-01-14 14:44:13 +00:00
pooka c3183f3251 The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change
2010-01-08 11:35:07 +00:00
pooka 283c2ca905 Rename PUFFS_SOPREQ_EXIT to PUFFS_SOPREQSYS_EXIT to better signal
it comes from within the kernel instead of as a direct result of
a user request.

no functional change
2010-01-07 23:02:34 +00:00
pooka 8ed2ec74c7 Fix variable name in my commit tree too. 2010-01-07 22:59:27 +00:00
pooka d728f5380d Add a PUFFS_UNMOUNT server->kernel request, which causes the kernel
to initiate self destruct, i.e. unmount(MNT_FORCE).  This, however,
is a semi-controlled self-destruct, since all caches are flushed
before the (possibly) violent unmount takes place.
2010-01-07 22:45:31 +00:00
mbalmer 982581e04d Remove extra semicolons. 2010-01-05 13:30:10 +00:00
mbalmer a72f71643d Fix typo in comments, no code change. 2009-12-23 09:17:40 +00:00
pooka 4d6a407bdd Process flush requests from the file server in a separate thread
context.  This fixes a long-standing but seldomly seen deadlock,
where the kernel was holding pages busy (due to e.g. readahead
request) while waiting for the server to respond, and the server
made a callback into the kernel asking to invalidate those pages.
... or, well, theoretically fixes, since I didn't have any reliable
way of repeating the deadlock and I think I saw it only twice.
2009-12-07 20:57:55 +00:00
pooka 0ff1ef75c2 Need to send protocol layer response instead of transport layer
return value.  While there, just collapse all non-supported types
into one entry.
2009-12-07 15:51:52 +00:00
pooka 843ee69fbe Push all information cached in the vnode to the file server before
issuing INACTIVE.  PR kern/42194.
Also, send setattr in fsync asynchronously if FSYNC_WAIT is not set.
2009-12-04 20:26:35 +00:00
pooka d630c255de vrele, not vput for unlocked devvp 2009-12-03 14:29:04 +00:00
pooka 3f331fa147 Call VOP_CLOSE() in mount error branch with the device locked to
prevent crash when specfs attempts to unlock the vnode.
2009-12-01 09:28:02 +00:00
pooka 1643f3a7a1 Introduce genfs_statvfs() as pretty much a no-info statvfs and
convert several pseudo file systems to use it.
2009-11-30 10:59:19 +00:00
pooka 0ff76018d0 Yes, you need a VOP_UNLOCK() there. 2009-11-27 16:23:23 +00:00
pooka 8b53d2f9df Fix another fine example of "if you make the kernel panic, it's
more secure".
2009-11-27 16:11:35 +00:00