Commit Graph

1033 Commits

Author SHA1 Message Date
yamt 4170b65f86 nfs_lookup: fix indent. 2007-11-13 11:37:08 +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
yamt 79606bd6fa make NFS_ATTRTIMEO a function. 2007-10-28 22:24:28 +00:00
yamt 46b951d6aa remove lwp argument from nfs_reconnect and always use &lwp0
because who triggers a reconnect doesn't really matter here.  PR/37145.
2007-10-21 08:23:19 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 451aacda90 Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.
2007-10-08 15:12:05 +00:00
rmind 27ad3d8619 nfs_mount: Plug a possible leaks.
Invented in 1.114 rev.
From CID: 4534
2007-09-06 01:11:44 +00:00
dyoung bb04fc71fb Use sockaddr_in_init() and ifreq_setaddr() to initialize a sockaddr_in
and an ifreq.ifr_addr, respectively.  Get rid of an extraneous
cast---down the elevator shaft!  Change 'ireq' to 'ifr', which is
what the kernel calls a temporary struct ifreq virtually everywhere
else.
2007-08-31 22:02:58 +00:00
dyoung 1751c5101f Constify: LLADDR() -> CLLADDR(). 2007-08-29 22:53:35 +00:00
yamt c379ad6567 - instead of scanning an array of iods, maintain a list of idle iods.
- make nfs_getset_niothreads MP friendly.
2007-08-10 15:12:56 +00:00
yamt 8e473ee7cb push kernel_lock a little. 2007-08-08 12:27:56 +00:00
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