Commit Graph

822 Commits

Author SHA1 Message Date
ad
6d827ae10e Correct previous. 2008-01-17 10:28:24 +00:00
ad
33b917a83d smbfs_reclaim: fix a broken assertion. 2008-01-17 10:25:01 +00:00
ad
bf01c1fd6b union_putpages: fix a locking botch. 2008-01-16 10:10:18 +00:00
christos
d4fda54fa5 PR/37696: Paul Ripke: add large read / readahead support (Introduce run-length
detection to msdosfs_bmap(), from FreeBSD)
2008-01-05 18:42:14 +00:00
ad
0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
pooka
933a1a1af1 Politely refuse to mount a file system which says its FAT size is
zero - our implementation can't handle it (how sensible handling
a case like that would be is a whole other debate).

fixes panic reported by Jukka Salmi on current-users
2008-01-04 14:58:16 +00:00
pooka
89943d2ace fix vmlocking2 fallout: fstrans_mount/unmount 2008-01-03 18:09:35 +00:00
pooka
34fa5dc385 struct vop_foo_args comment police: a_l has ceased to be 2008-01-03 02:18:20 +00:00
pooka
d53e261066 valloc -> vnalloc, vfree -> vnfree
Avoids collision with userland valloc(3).

no functional change
ad ok
2008-01-03 01:26:28 +00:00
pooka
4f32bae2c1 More type-punning workarounds. Curiously the kernel compilation
flags cause gcc to not complain.
2008-01-02 22:37:19 +00:00
pooka
b8121d8a80 silence gcc about break type-punning 2008-01-02 22:33:10 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
pooka
a5ee2954b8 namespace a bit: vfsops -> puffs_vfsop_x() and vops -> puffs_vnop_x() 2007-12-30 23:04:12 +00:00
reinoud
a661982b31 Use uvm_vnp_setwritesize() on file extending to instruct UVM to NOT read-in
the newly added space first. This significantly speeds up write speed for
msdosfs and making it at par with ffs wich already had this patched.

Speed increase measured on my IDE disc from 2Mb/sec to 32 Mb/sec
2007-12-28 17:46:48 +00:00
perry
b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
perry
9b2b412c19 __FUNCTION__ -> __func__ 2007-12-15 00:39:14 +00:00
lukem
9a633d3a1a use __KERNEL_RCSID() instead of __RCSID() 2007-12-11 12:05:27 +00:00
lukem
ceed9c722c use __KERNEL_RCSID() 2007-12-11 11:52:26 +00:00
pooka
319ddafdc5 Now that "l" is gone both as an argument to operations and from
componentname, remove all vestiges of puffs_cid.
2007-12-08 19:57:02 +00:00
pooka
db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +00:00
ad
1bea664342 Merge ihash locking changes from the vmlocking branch. 2007-12-08 14:48:33 +00:00
ad
6a3b582fe3 Merge locking changes + fixes from the vmlocking branch. 2007-12-08 14:41:11 +00:00
pooka
4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
pooka
7d5d7f4ff9 Send a response message for flush operations from the kernel instead
of abusing the return value of write(2).
2007-12-05 12:11:56 +00:00
pooka
c024a3a48f Add a bit to differentiate if a message is a request or a response. 2007-12-04 19:43:42 +00:00
pooka
1ff78520d8 Destroy genfs_node in reclaim. And init it earlier in vget so that we
don't try to destroy an uninited lock should vget fail.
2007-11-30 11:23:10 +00:00
reinoud
1783f9c4fa Pullup fixes from UDF RW support project. This commit fixes the
mmc_discinfo conceptional bug and also vastly improves VAT searching.
2007-11-27 18:10:42 +00:00
pooka
6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
pooka
1b346350d5 In case the userspace wait is interrupted, don't use ERESTART as
the return value, rather use EINTR.

reported by Reinoud
2007-11-26 12:57:26 +00:00
pooka
6cccb0c686 * Use vfs_stdextattrctl instead of a homegrown version. Also fixes
a bug: the homegrown version neglected to unlock vp
* don't reimplement eopnotsupp()
* init genfs_node earlier vget, protects against error paths in vget
  from attempting to destroy a non-inited node
2007-11-25 16:26:42 +00:00
pooka
e490f118e2 Fix a race condition: in case two source paths hardlinked to the
same file were renamed simultaneously, there was a window where
directory entry cached in the vnode during lookup would be replaced
before calling rename.  This lead to one directory entry getting
renamed twice and the other one getting zero renames.  Do a relookup
in rename to make sure we have the correct directory entry.

Thanks go to Greg Oster for reporting the problem, helping with
debugging and thoroughly testing the patch.
2007-11-23 17:16:22 +00:00
pooka
5dec3ab667 Don't KASSERT that the pool allocator returns a page - it might be
called with NOWAIT.

XXX: this is just a quick fix to stop the diagnostic panic.  I
think ENOSPC should be treated elsewhere depending on how much
memory tmpfs claims.
2007-11-22 21:08:10 +00:00
pooka
bc7c4b36bc use BUF_ISREAD/WRITE instead of homegrown variants 2007-11-21 16:30:40 +00:00
pooka
7c0ef2ee17 Retire M_PUFFS, use kmem(9) instead. 2007-11-20 11:51:01 +00:00
pooka
61b1e9a615 Make puffs_updatenode() take a puffs_node instead of a vnode. This
way we don't need to worry if a vnode has been reclaimed from under
us.
2007-11-17 21:55:29 +00:00
pooka
63e9f065b3 Start playing around with vnode locks. For now, do the very easy
thing and release locks before the userspace wait for operations
which release the lock before exit from the method in any case.
However, releasing the lock after inserting the request on the
operation queue gives us proper ordering possibilities in userspace
(at least if that bit were implemented, but I don't think there
any file system in userspace that depends on kernel locking and
probably there never should be one).

inspired by a conversation with Nacho Navarro
2007-11-17 21:30:48 +00:00
pooka
ac5e27103d Implement a biodone callback for async writes similar to reads and
use that when possible.
2007-11-17 18:09:04 +00:00
pooka
803c088ce0 fix some debug prints 2007-11-17 18:03:15 +00:00
pooka
622412c6c3 Restructure the messaging interface a bit more: make all interfacing
with the file server happen through puffs_msg_enqueue() and
puffs_msg_wait() instead of having a billion different routines.
Build the existing system upon these two.  Most importantly though,
decouple insertation into the op queue from the actual wait.  This
is useful for a number of reasons coming soon to a cvs repo near you.
2007-11-16 20:32:17 +00:00
pooka
4a0a4d4f30 Fix a problem noticed by Reinoud: the fs would try to release an
unlocked vnode when trying to rename a directory.  The fix was to
shuffle some bits around and #pray.

The rename routine actually needs a very very major wide-angle whopping:
 * it takes locks out-of-order
 * it deals with references from SAVESTART lookups in interesting ways
 * I doubt there is any guarantee for correct operation if there
   are multiple concurrent accesses
 * the error branches might just as well call panic() directly
2007-11-14 19:16:29 +00:00
pooka
ca28ea4509 Bounds-check responses from userspace. 2007-11-12 17:42:13 +00:00
pooka
9ac65ee1fe * split the putter header into a kernel version and a userland version
+ install latter to /usr/include/dev/putter
* remove last dependencies to puffs from putter, it's completely
  independent now
2007-11-12 16:39:32 +00:00
pooka
70981e62b1 Move putter code from directly under dev/ to dev/putter/
no functional change
2007-11-12 14:30:55 +00:00
pooka
f2031ea28b Part 2/n of extensive changes to request transport to/from userspace:
Rip the transport code completely out of puffs and generalize it
into an independent module which will be used for multiple purposes
in the future.  This module is called the Pass-to-Userspace
Transporter (known as "putter" among friends).

This is very much work-in-progress and one dependency with puffs
remains: the request framing format.

The device name is still /dev/puffs, but that will change soon.

Users of puffs need the following in their kernel configs now:
pseudo-device   putter
2007-11-10 21:45:04 +00:00
ad
65b374fb48 Back out the tmpfs changes; there appears to be a bug lurking. 2007-11-10 03:36:16 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
ad
dc73f9929a Merge from vmlocking. 2007-11-06 19:50:55 +00:00
pooka
67eb7aa96c Make some comments match current reality. No functional change. 2007-11-04 17:32:34 +00:00
reinoud
ed2d3954ca Fix panic when the VAT couldn't be found. It would refer an stale
udf_node->vnode.
2007-10-31 15:42:13 +00:00