Commit Graph

1021 Commits

Author SHA1 Message Date
yamt 9c0f7c2a93 nfs_inactive: turn a panic into a printf for now, as it isn't critical.
PR/36572 from Martin Husemann.
2007-08-06 11:55:08 +00:00
yamt 1f0f803e45 use kpause rather than lbolt. 2007-08-05 09:40:39 +00:00
yamt 5bde4f20f7 nfsrv_slpderef: add an assertion. 2007-08-02 12:46:03 +00:00
yamt d72bfdbeb2 nfsdsock_unlock: add an assertion. 2007-08-02 12:45:37 +00:00
yamt 4af13cf23b nfssvc_nfsd: fix a wrong assertion. PR/36710 from Tobias Nygren. 2007-08-02 12:44:18 +00:00
yamt 6bc5a5a70f nfsrv_zapsock: update SLP_DOREC for consistency. 2007-08-02 12:42:17 +00:00
yamt 76eb9e074c nfssvc_nfsd: don't leave sockets with SLP_DISCONN. 2007-08-02 12:40:36 +00:00
pooka 8d1f899239 * nuke the nameidata parameter from VFS_MOUNT(). Nobody on tech-kern
knew what it was supposed to be used for and wrstuden gave a go-ahead
* while rototilling, convert file systems which went easily to
  use VFS_PROTOS() instead of manually prototyping the methods
2007-07-31 21:14:15 +00:00
ad a0d1fd8d0c It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 13:31:07 +00:00
yamt c90a0e2579 stop nfs tick when we have nothing to do. 2007-07-27 10:03:58 +00:00
yamt 662e7a9e40 use ubc_uiomove for read as well. 2007-07-27 10:00:42 +00:00
yamt 3822af7031 ubc_uiomove: add an "advice" argument rather than using UVM_ADV_RANDOM blindly. 2007-07-27 09:50:36 +00:00
pooka d9970c8066 Use eopnotsupp() instead of vfs_stdsuspendctl() and retire the latter. 2007-07-26 22:57:36 +00:00
pooka 9137aeda4b In sync, skip over vnodes based on if they are clean rather than
if they have pages.
2007-07-20 16:46:43 +00:00
yamt 97c7bbe6b8 - fix decreasing of vfs.nfs.iothreads after the recent partial merge
of vmlocking.
- don't make nfsiod exit with requests left.
- make NFSSVC_BIOD a dummy so that nfsiod can be simplified.
2007-07-20 15:36:41 +00:00
dyoung 08e6f22226 Take steps to hide the radix_node implementation of the forwarding table
from the forwarding table's users:

        Introduce rt_walktree() for walking the routing table and
        applying a function to each rtentry.  Replace most
        rn_walktree() calls with it.

        Use rt_getkey()/rt_setkey() to get/set a route's destination.
        Keep a pointer to the sockaddr key in the rtentry, so that
        rtentry users do not have to grovel in the radix_node for
        the key.

        Add a RTM_GET method to rtrequest.  Use that instead of
        radix_node lookups in, e.g., carp(4).

Add sys/net/link_proto.c, which supplies sockaddr routines for
link-layer socket addresses (sockaddr_dl).

Cosmetic:

        Constify.  KNF.  Stop open-coding LIST_FOREACH, TAILQ_FOREACH,
        et cetera.  Use NULL instead of 0 for null pointers.  Use
        __arraycount().  Reduce gratuitous parenthesization.

        Stop using variadic arguments for rip6_output(), it is
        unnecessary.

        Remove the unnecessary rtentry member rt_genmask and the
        code to maintain it, since nothing actually used it.

        Make rt_maskedcopy() easier to read by using meaningful variable
        names.

        Extract a subroutine intern_netmask() for looking up a netmask in
        the masks table.

        Start converting backslash-ridden IPv6 macros in
        sys/netinet6/in6_var.h into inline subroutines that one
        can read without special eyeglasses.

One functional change: when the kernel serves an RTM_GET, RTM_LOCK,
or RTM_CHANGE request, it applies the netmask (if supplied) to a
destination before searching for it in the forwarding table.

I have changed sys/netinet/ip_carp.c, carp_setroute(), to remove
the unlawful radix_node knowledge.

Apart from the changes to carp(4), netiso, ATM, and strip(4), I
have run the changes on three nodes in my wireless routing testbed,
which involves IPv4 + IPv6 dynamic routing acrobatics, and it's
working beautifully so far.
2007-07-19 20:48:52 +00:00
pooka e24b0872a4 Make set_statvfs_info() take a parameter for the vfs name instead
of always retrieving it from mp->mnt_op->vfs_name

christos ok
2007-07-17 11:19:31 +00:00
yamt bc1bb99dc5 remove (void)0; nonsense. 2007-07-17 10:24:10 +00:00
yamt 9dc12587a5 fix a typo in a comment. 2007-07-17 10:23:33 +00:00
dsl 2721ab6c7b Change the VFS_MOUNT() interface so that the 'data' buffer passed to the
fs code is a kernel buffer, pass though the length of the buffer as well.
Since the length of the userspace buffer isn'it (yet) passed through the mount
system call, add a field to the vfsops structure containing the default length.
Split sys_mount() for calls from compat code.
Ride one of the recent kernel version changes - old fs LKMs will load, but
sys_mount() will reject any attempt to use them.
2007-07-12 19:35:32 +00:00
rmind 845fda992a nfs_asyncio: fix the locking in error case, problem was introduced
in 1.153 revision, where ltsleep() was replaced with condvar.

Problem found and fix provided by David A. Holland, PR/36610.
Actually, relock is not needed here, and mutex would be unlocked
only on nfs_sigintr() fail case.
2007-07-12 18:29:43 +00:00
ad e05e11c21a Fix build when not !NFSSERVER. 2007-07-09 21:29:09 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
bouyer a92a400fbf Add a new BOOTSTATIC flag, NFS_BOOTSTATIC_NOSTATIC, which causes
nfs_bootstatic() to abort with EOPNOTSUPP. This allows a callback to
say that there is no bootstatic config, and the next NFS boot method should
be tried.
2007-07-08 21:08:09 +00:00
dsl 6319443e37 Updates for changes prototype of kauth_cred_set/getgroups(). 2007-06-30 15:27:02 +00:00
yamt f0baa9219b - nfsrv_slpderef: fix a locking botch.
(should fix "slp->ns_sref == 0" assertion failures in nfsrv_init)
- add some related assertions.
2007-06-22 14:39:59 +00:00
yamt 0eaaf7405e nfssvc_iod: fix nm_bufqiods accounting on exit. 2007-06-19 13:13:37 +00:00
yamt 7508122896 nfs_write:
- IO_SYNC: don't bother to flush dirty pages before copying data from
  user buffer.
- IO_APPEND: don't invalidate pages blindly.  PR/28472 from Brian Marcotte.
2007-06-12 09:42:27 +00:00
yamt f1ce35c9f6 nfs_inactive: don't clear NTRUNCDELAYED erroneously.
(fix cache consistency problems like NUL bytes near EOF.)
2007-06-12 09:33:25 +00:00
yamt ac63eb98da - nfssvc_nfsd: clear nfsd_slp when exiting.
(fix an assertion failure in rev.1.112.)

- nfsrv_init: add assertions.
2007-06-12 09:30:49 +00:00
dyoung a8fef725ac There is only one radix trie walker, and it is rn_walktree(), so
use that instead of the indirect function call through rnh,
rnh->rnh_walktree.
2007-06-09 02:33:41 +00:00
dyoung 99964897cf Cosmetic: de-__P() et cetera. 2007-06-09 02:32:34 +00:00
yamt a4a20623eb nfs_getattrcache: simplify. no functional changes. 2007-06-06 09:23:55 +00:00
yamt da51d139a4 improve post-ubc file overwrite performance in common cases.
ie. when it's safe, actually overwrite blocks rather than doing
read-modify-write.

also fixes PR/33152 and PR/36303.
2007-06-05 12:31:30 +00:00
yamt 326517bd8d add some #include. 2007-06-02 03:32:51 +00:00
dogcow 0023297d28 it seems like a good idea to include <sys/condvar.h>, as we're using them... 2007-06-01 23:16:33 +00:00
yamt 63abe2b629 nfssvc_nfsd: check SPCF_SHOULDYIELD and yield cpu. 2007-06-01 14:43:17 +00:00
yamt ab5f84630b nfssvc_nfsd: add assertions. 2007-06-01 14:10:02 +00:00
yamt 05aaff39ff use mutex and condvar. 2007-06-01 11:56:03 +00:00
yamt 61131eb130 nfsdsock_lock: fix an inverted check of SLP_VALID. 2007-06-01 11:38:44 +00:00
yamt febe85111f - remove nfs_exit exit hook. ok'ed by christos@.
- as far as i understand the code, it shouldn't be necessary
	  because nfs_request can't return without removing its request
	  and r->r_lwp is either curlwp or NULL.
	- even if it's necessary, leaking requests is not the correct way
	  to recover from the condition.
- nfs_request: add a related assertion.
2007-05-28 16:47:38 +00:00
yamt 683644f00e nfs_write: report an error correctly in the case of IO_SYNC. 2007-05-09 23:17:45 +00:00
manu f39939ad43 Fix buid (broken by a fix introduced in the wrong file...) 2007-05-08 09:29:50 +00:00
manu 31b57f40ff Add the TFTPROOT kernel option for TFTP'ing root RAMdisk at root mount time.
This allows working around situations where a kernel with embedded RAMdisk
cannot be booted by the bootloader because the RAMdisk is too big.
2007-05-08 06:10:27 +00:00
yamt fce3c58e5e nfs_rcvlock: fix NFSMNT_INT check, which has been broken since rev.1.39. 2007-05-02 16:19:55 +00:00
yamt e4c778084c - nfs_reply: keep rcvlock longer so that lwp which already have its reply
received won't be stuck in nfs_receive.
- nfs_rcvlock: check exceptions before sleeping on the lock.
- nfs_rcvunlock: use cv_broadcast rather than cv_signal to ensure that
  lwps which received its reply get woken up.
2007-05-02 14:48:47 +00:00
yamt ab54f30196 remove R_GETONEREP. 2007-04-30 23:10:55 +00:00
yamt 6e3d653f39 fix a lock leak in rev.1.109. pointed by Mindaugas R. 2007-04-30 10:30:51 +00:00
yamt fbee155d25 use mutex and condvar. 2007-04-29 15:31:53 +00:00
yamt 6623a01439 don't forget to destroy mutex and condvar. 2007-04-29 15:30:26 +00:00