Commit Graph

1161 Commits

Author SHA1 Message Date
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
pooka 85fb4c9d18 Don't spam if mount fails due to invalid file system. 2009-11-27 15:58:39 +00:00
jmmv df61ab1eba Fix panic when trying to delete a directory entry (hi yamt!) by not
attempting to release a pnbuf that does not exist.

I.e. fixes "mkdir a ; unlink a/.".  And actually, this was caught by the
automated tests.
2009-11-22 17:09:58 +00:00
pooka c58b208bec Send VOP_ABORTOP() in case attempting cross-dev rename, part of
PR kern/42210.  Also, fix a memory management error in said case.
2009-11-19 16:21:04 +00:00
pooka 3214542837 Send VOP_ABORTOP() as a FAF -- we don't care about the return value. 2009-11-19 15:50:49 +00:00
rmind 7c653ba04c Simplify tmpfs_itimes() and use vfs_timestamp(). Also, replace unnecessary
kmem_zalloc()s with kmem_alloc()s.
2009-11-11 09:59:41 +00:00
pooka 1d8c6c1718 Kill suspend support. It was never implemented correctly:
* it depended on the biglock (in a very cruel way)
  * it was attached to userspace transactions rather than logical
    fs operations

(If someone wants to revisit it some day, most of the stuff can be
reused from cvs history)
2009-11-05 19:42:44 +00:00
pooka 1ed7a6beef Reinstante PNODE_DYING. vmlocking had a brief hiatus when it was not
a valid optimization, but that's long gone and once VOP_INACTIVE is
called and the file server says that the vnode is going to be recycled,
it really is going to be recycled extra references gained or not.
2009-11-05 19:22:57 +00:00
bouyer e0f9b22254 Remove closes 3 and 4 from my copyright. 2009-10-22 21:50:01 +00:00
tron 6492b9712e Add support for 64 bit file offsets to smbfs_smb_setfsize(), largely
based on code taken from FreeBSD.

This stops truncation of files larger than 4GB by VOP_SETATTR() which e.g.
happened when copying large files "rump_smbfs". Kudos to Antti Kantee
for diagnosing the problem in smbfs_smb_setfsize().
2009-10-20 20:55:01 +00:00
pooka 6f49a65bc8 Set recycle to false along with a comment screaming that it should
be set properly to recycle unused vnodes immediately.
2009-10-19 19:12:06 +00:00