Commit Graph

110068 Commits

Author SHA1 Message Date
phk
39311fe2e6 Convert coda to nmount. 2004-12-06 19:46:02 +00:00
rwatson
892d4bfa16 Switch from using an sx lock to a mutex for the mac_portacl rule chain:
the sx lock was used previously because we might sleep allocating
additional memory by using auto-extending sbufs.  However, we no longer
do this, instead retaining the user-submitted rule string, so mutexes
can be used instead.  Annotate the reason for not using the sbuf-related
rule-to-string code with a comment.

Switch to using TAILQ_CONCAT() instead of manual list copying, as it's
O(1), reducing the rule replacement step under the mutex from O(2N) to
O(2).

Remove now uneeded vnode-related includes.

MFC after:	2 weeks
2004-12-06 19:43:45 +00:00
glebius
83e7e80417 Document route caching, how it can be enabled, and its consequences.
Wording by:	cperciva
2004-12-06 19:31:35 +00:00
ps
8eaa4f53e4 2 fixes that improve on the consistency of the NFS client cache.
- Change the cached mtime to a 'struct timespec' from a
  time_t. Improving the precision of the cached mtime tightens up
  NFS' "close-to-open" consistency considerably.
- Always force an over-the-wire consistency check from nfs_open()
  (unless the file is marked modified). This further improves
  NFS' "close-to-open" consistency.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 19:18:00 +00:00
phk
b894547e6f Convert msdosfs to nmount.
Add a vfs_cmount() function which converts omount argument stucture
to nmount arguments.

Convert vfs_omount() to vfs_mount() and parse nmount arguments.

This is 100% compatible with existing userland.

Later on, but before userland gets converted to nmount we may want
to revisit the names of the mountoptions, for instance it may make
sense to use consistent options for charset conversion etc.
2004-12-06 19:05:48 +00:00
glebius
a67e8a38b3 - Make route cacheing optional, configurable via IFF_LINK0 flag.
- Turn it off by default.

Requested by:	many
Reviewed by:	andre
Approved by:	julian (mentor)
MFC after:	3 days
2004-12-06 19:02:43 +00:00
ps
aa4aa62af0 Serialize NFS vinvalbuf operations by acquiring/upgrading to the
vnode EXCLUSIVE lock. This prevents threads from adding pages to
the vnode while an invalidation is in progress, closing potential
races. In the bioread() path, callers acquire the SHARED vnode lock
- so while an invalidate was in progress, it was possible to fault
in new pages onto the vnode causing the invalidation to take a while
or fail. We saw these races at Yahoo! with very large files+heavy
concurrent access. Forcing an upgrade to EXCLUSIVE lock before doing
the invalidation closes all these races.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 18:52:28 +00:00
scottl
f98e4c8a08 Due to a significant addition of code, add my copyright to this file. Also
note that the PCIe work was made possible due to hardware donations from
the FreeBSD Foundation and Intel.  Thanks!
2004-12-06 18:19:32 +00:00
phk
dbe532a28b Add more functions for handling mount arguments in VFS_MOUNT():
vfs_flagopt() for binary/boolean options.
vfs_getopts() for string options
vfs_filteropt() to check for unknown options.
vfs_scanopt() for scanf() like processing of options.

Also add function for setting the stat.f_mntfromname field.
2004-12-06 18:18:35 +00:00
ps
5feadd3eba Add non-blocking versions of nfsm_dissect() and friends, for use from
socket callbacks or similar callers, from both the NFS client and the
server.
Instituted nfsm_dissect_nonblock(), nfsm_dissect_xx_nonblock(). And
nfsm_disct() now takes an extra M_TRYWAIT/M_DONTWAIT argument.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 17:33:52 +00:00
phk
e196d80083 Change the first argument of vfs_cmount() to a handy struct mntarg* and
call it accordingly.

(No filesystems implement vfs_cmount() yet, so this is a no-op commit)
2004-12-06 16:39:05 +00:00
ps
ebd6438ae1 - If all data has been committed to stable storage on the server, it
is safe to turn off the nfsnode's NMODIFIED flag.
- Move the check for signals to the top of the loop where we loop
  around the dirty buffers on the vnode, scheduling writes. This
  ensures that we'll break ouf of the flush operation on reception of
  a signal.

Submitted by:	Mohan Srinivasan mohans at yahoo-inc dot com
2004-12-06 16:35:58 +00:00
rwatson
a98750ac1b Correct a typo in a comment. 2004-12-06 16:11:25 +00:00
delphij
83790ecb0c Correct two bugs that may result in incorrect CBCP response for
administrator specified number.

The implementation in our version transmits extra zero byte that is a
violation of the Microsoft PPP Callback Control Protocol section 3.2[1].
This can lead to incorrect behavior on certain devices, as reported
in bin/50613.

Confirmed with:	cbcp.c in ppp's cvs, rev. 1.4 and 1.15 [2]

Submitted by:	Dmitry Pryanishnikov <dmitry at atlantis.dp.ua>
PR:		bin/50613

[1] http://www.dsl.gr.jp/~manabe/PPxP/doc/Standards/draft-gidwani-ppp-callback-cp-00.txt
[2] http://cvs.samba.org/cgi-bin/cvsweb/ppp/pppd/cbcp.c
    http://www.samba.org/cvs.html
2004-12-06 15:49:52 +00:00
bland
f31ff0ee8a Fix -t option processing.
Partially initialized tm structure was passed into mktime(3).

Approved by:	ru
2004-12-06 15:38:24 +00:00
harti
885c50507d Some constification which doesn't require code rewrites. 2004-12-06 15:20:12 +00:00
roberto
930ad3d9dc This commit was generated by cvs2svn to compensate for changes in r138451,
which included commits to RCS files with non-trunk default branches.
2004-12-06 14:33:29 +00:00
roberto
25b467e3d9 Merge from the main BK repository for ntp: put two midly annoying messages
under #ifdef DEBUG. Merge of revision 1.45 by H. Stenn.

Done on the vendor branch to minimise future imports.

Reminded by:	obrien
2004-12-06 14:33:29 +00:00
rwatson
3522c0a675 Print a warning if running as !root for aio_md_test rather than failing
the test.  Privilege is required in order to allocate an md device.
2004-12-06 13:15:23 +00:00
phk
51c6653f10 Add a few convenient functions in the mount_arg() family and collect the
entire family at the end of the source file.
2004-12-06 13:01:41 +00:00
rwatson
8bd5ca5854 Add a basic aio functionality regression test, which simply writes and
then reads from a fairly broad range of object types: regular file,
fifo, UNIX socketpair, pty, UNIX pipe, and an md device.  Not a deep
test of functionality, just a basic test that aio_write followed by
aio_read returns the correct data in a relatively timely manner.

Requested by:	phk
2004-12-06 12:56:38 +00:00
phk
e1b20748c2 Collapse two almost identical license copies, preserving the rights of
all listed authors, rightholders and contributors.
2004-12-06 12:44:30 +00:00
phk
62d457bcc4 Remove the kern.rootdev sysctl.
Root filessytems (like NFS) don't have an associated disk device,
and even if they had, the exact semantics would be filesystem
dependent and should be implemented there.
2004-12-06 12:40:45 +00:00
phk
bcbc430a4b Make struct vfsopt{list} private to vfs_mount.c 2004-12-06 12:36:17 +00:00
phk
28a46c9c9c Fix warning 2004-12-06 12:34:28 +00:00
jkoshy
235d737b2a Update prototypes for eventhandler_register() and eventhandler_find_list()
to match the code.
2004-12-06 11:30:55 +00:00
harti
f237a4f68d Style: fix indentation. 2004-12-06 11:30:36 +00:00
pjd
7d8ef218e3 We don't have RAIDFrame anymore and it seems gvinum doesn't use SI_SUB_RAID,
so correct stale comment. The only SI_SUB_RAID consumer is gmirror right now.
2004-12-06 11:28:02 +00:00
jkoshy
cb37acb890 Use 'const char *' for a few prototypes.
Reviewed by:	ru
2004-12-06 10:53:40 +00:00
ru
96a90ac8d7 Unbreak sockstat(1) on systems without the divert protocol. 2004-12-06 09:28:05 +00:00
harti
f55a4ad1b5 Remove an unused macro. 2004-12-06 08:57:41 +00:00
harti
6fb43802bf Constify arguments to Hash_FindEntry and Hash_CreateEntry. 2004-12-06 08:56:30 +00:00
harti
cf54e99966 Remove extra empty lines. 2004-12-06 08:52:02 +00:00
harti
c06cfd7434 Style: fix indentation, prototypes for functions even in comment. 2004-12-06 08:51:34 +00:00
ru
0a293bea5c Make this work under debugging, e.g., "make -dl". 2004-12-06 08:51:30 +00:00
phk
797ee56603 Userland change corresponding to the change in kernel/userland communication
for NFS locking.
2004-12-06 08:32:09 +00:00
phk
753d615ec0 For reasons unknown, the nfs locking code used a fifo to send requests to
userland and a dedicated system call to get replies.

The vnode-bypass of fifos broke this into a panic.

Ditch all the magic and create a device /dev/nfslock instead, and
use that for both directions apart from the shorter path, this is
also faster because the device driver runs Giant free using the
vnode bypass.

Noticed by:	marcel
2004-12-06 08:31:32 +00:00
scottl
b62f254b42 Add support for the memory-mapped PCI Express configuration mechanism. This
actually is a property of the northbridge and applies to all PCI/PCI-X/PCIe
devices in the system, though only PCIe devices will respond to registers
higher than 256.  This uses per-CPU pools of temporary mappings so that
the whole 256MB of configuration space doesn't have to be mapped all at
once.  While the sf_buf API was considered for this, the fact that it
requires sleep locks and can return failure made it unsuitable for this use.

For now only the Intel Grantsdale and Lindenhurst (925 and 752x) chipsets are
supported.  Since there doesn't appear to be a compatible way to determine
northbridge support, new chipsets will have to be explicitely added in the
future.
2004-12-06 08:27:10 +00:00
imp
53f3deb9de The 'start' command processes loader.conf variables, not loader.rc.
Fix comment to match.
2004-12-06 05:30:31 +00:00
alc
7563fb5dcb This jumbo allocator has been removed from the kernel. 2004-12-06 04:24:17 +00:00
obrien
b3a3af726d Enable amr(4) - scottl fixed when used with >4GB RAM. 2004-12-06 02:50:31 +00:00
alc
630d0d0838 Update the Tigon 1 and 2 driver to use the sf_buf API for implementing
zero-copy receive of jumbo frames.  This eliminates the need for the
jumbo frame allocator implemented in kern/uipc_jumbo.c and sys/jumbo.h.
Remove it.

Note: Zero-copy receive of jumbo frames did not work without these changes;
I believe there was insufficient locking on the jumbo vm object.

Tested by: ken@
Discussed with: gallatin@
2004-12-06 00:43:40 +00:00
scottl
29448bd3e8 Fix a number of bugs and significantly alter the command execution path to
properly support bounce buffers and resource shortages.  This allows the
driver to work properly and reliably with more than 4GB of RAM.  Of the
three data paths that exist in the driver, (block, CAM, ioctl), the ioctl
path has not been well tested with these changes due to difficulty with
finding an application that uses it that actually works.

Sponsored by: The FreeBSD Foundation and FreeBSD Systems, Inc.
2004-12-05 23:48:17 +00:00
hmp
8f9a2ff959 Code for automatic name completion in a tcsh(1) environment.
PR:		docs/44435
Submitted by:	Slaven Rezic slaven dot rezic at berlin dot de
2004-12-05 23:44:52 +00:00
glebius
66304651ce Use ng_callout() instead of timeout(9).
Approved by:	julian (mentor)
2004-12-05 22:58:13 +00:00
rwatson
6b017b90b9 Convert GIANT_REQUIRED; in nfs_mountroot() to NET_ASSERT_GIANT(),
and annotate that nfs_mountroot assumes it is OK to step on the
values in the global NFSv3 diskless structure as the mountroot
function is called during a serialized part of the boot, before
any other NFS client activity occurs.

MFC after:	2 weeks
2004-12-05 22:53:17 +00:00
rwatson
22be685755 Convert a GIANT_REQUIRED; into a NET_ASSERT_GIANT();, as sockets are
now only conditionally protected by Giant based on debug.mpsafenet.
2004-12-05 22:50:09 +00:00
cognet
49745b3e73 Make sure to map the whole kernel into 1MB pages. Try to use the remaining
memory for things such as the kernel stack.
2004-12-05 22:48:04 +00:00
rwatson
47b5ad626d Assert the tcptw inpcb lock in tcp_timer_2msl_reset(), as fields in
the tcptw undergo non-atomic read-modify-writes.

MFC after:	2 weeks
2004-12-05 22:47:29 +00:00
cognet
1286f9fc64 Reactivate the use of the minidata cache. 2004-12-05 22:47:25 +00:00