Commit Graph

105773 Commits

Author SHA1 Message Date
pjd
578bfcb897 If there are no valid components after the timeout, just destroy device.
There is probably nothing to wait for.
2004-07-31 22:10:51 +00:00
le
e2ca49b0bc Propagate size changes upwards. 2004-07-31 21:34:21 +00:00
glebius
900350dd1b Fix a stupid error in my previous commit, which broke operation
of many nodes.

Pointy hat to:	glebius
2004-07-31 21:32:55 +00:00
pjd
e0a971d6d4 Handle spoil event in dedicated function: g_mirror_spoiled().
The different between the new function and g_mirror_orphan() (which was
used previously) is that syncid is bumped immediately, instead of on
first write, because when consumer was spoiled, it means, that its
provider was opened for writing, so we can't trust that its data
will be valid when it will be connected again.
2004-07-31 21:08:17 +00:00
fjoe
e5cc9c9fa2 Add copyright notices.
Prodded by:	imp
2004-07-31 20:47:57 +00:00
imp
4f59933abf Expand the license referenced indirectly inline. 2004-07-31 18:49:53 +00:00
trhodes
3b4ff08a4f Help simon out and add a HARDWARE section. 2004-07-31 15:14:28 +00:00
pjd
a9d4d391b8 Allow for capital letters as size suffixes.
Inspired by:	le
Approved by:	green (maintainer)
2004-07-31 15:13:08 +00:00
yar
55224f76bf ftpd(8) seems to be WARNS=2 clean now.
Tested on:	i386, ia64, amd64, sparc64, alpha
2004-07-31 15:07:33 +00:00
yar
d786b94f15 Change `(foo *)0'' to `NULL'' where it's possible
(and it appears possible throughout ftpd(8) source.)

It is not a mere issue of style: Null pointers in C
seem to have been mistaken one way or another quite often.
2004-07-31 15:03:17 +00:00
yar
06b7ed859f Kill a small herd of casts to off_t where they were not needed.
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.
2004-07-31 14:46:41 +00:00
yar
634a2a6e4f Printf(3) off_t values through conversion to intmax_t since
we've got <stdint.h> et al now.  (This makes ftpd(8) WARNS=2 clean.)
2004-07-31 14:22:02 +00:00
davidxu
7ef444d527 Save context in kernel fashion, so it can be restored by
kse_switchin syscall.
2004-07-31 14:18:26 +00:00
davidxu
7dea99e896 Remove unused field. 2004-07-31 14:14:55 +00:00
yar
6f57f3272c Kill an unused variable (heading to WARNS=2.) 2004-07-31 14:03:59 +00:00
yar
81692845b8 Convert a couple of bogus null statements to the right form.
(Heading to WARNS=2.)
2004-07-31 14:03:14 +00:00
davidxu
3720a53426 Turn on PCB_FULLCTX for set_mcontext, functions like kse_switchin
needs to fully restore asynchronous context which did not come
from fast syscall.
2004-07-31 14:02:29 +00:00
pjd
e9aabe3b50 Remove unused field. 2004-07-31 13:03:38 +00:00
pjd
cd4a05fa81 Destroy synchronization geom immediately. This should fix unloading without
stopping all mirrors.
2004-07-31 11:22:03 +00:00
sos
e95ea22d81 Fix the panic (""memory modified after free") when ata_getparam() fails
and retries.

Found by:	Nate Lawson
2004-07-31 10:29:29 +00:00
pjd
73d6fc0052 Use SHLIBDIR instead of LIBDIR. This should fix buildworld breakage.
Reported by:	des
2004-07-31 09:20:27 +00:00
alc
add997e1ff Add pmap locking to pmap_object_init_pt(). 2004-07-31 06:42:05 +00:00
tjr
3a9d887f93 Check for read errors. 2004-07-31 06:22:57 +00:00
tjr
4817b11015 Add standard DIAGNOSTICS section. 2004-07-31 06:22:01 +00:00
tjr
57f33bc1c3 Add support for multibyte characters, loosely based on Bruno Haible's
work in the util-linux packages, but with some minor fixes.
2004-07-31 06:19:26 +00:00
tjr
8aa7bbf93e Fix some particularly bad style(9) violations. 2004-07-31 04:33:13 +00:00
alc
1a5d99c7ed Bump __FreeBSD_version to reflect the removal of kmem_alloc_pageable().
Requested by: pjd@
2004-07-31 03:44:46 +00:00
davidxu
ab04048f48 Macro optimize, this increases context switch speed about 2% on my
athlon64 machine.
2004-07-31 01:53:21 +00:00
davidxu
afc35161bc 1. Use correct alignment mask, -15 != ~15
2. Make end of frames
2004-07-31 01:41:41 +00:00
pjd
6bb53152ba Allow slice creation on providers from MIRROR class.
This should allow mounting root file system from a mirror.
2004-07-31 01:17:20 +00:00
imp
2a5cd86755 Use #include <unistd.h> rather than the explicit externs in the
example.  The externs haven't been needed in about 10 years, so
there's no reason to have them other than for hysterical raisins.  And
the California Rasins haven't been around for a long time...
2004-07-31 01:00:50 +00:00
pjd
0d74239c00 Add '-p' option for 'insert' command which allows to specify priority
of the new component.
Version number wasn't bumped (it should be), because I think there are
no geom_mirror users yet.
2004-07-31 00:54:44 +00:00
pjd
8c9f26b7ea - Check if 'slice' argument was given.
- Check if disk isn't already the mirror component.
2004-07-31 00:51:33 +00:00
pjd
ecaa6b91a6 Dump correct field. 2004-07-31 00:37:14 +00:00
le
d9c517d66a Set the access counts of a subdisk correctly when attaching it
to a plex that already has subdisks.
2004-07-30 23:40:38 +00:00
pjd
70045d465a Connect GEOM_MIRROR class to the build. 2004-07-30 23:18:53 +00:00
pjd
adaa0482b4 Add GEOM_MIRROR class which provide RAID1 functionality and has many useful
features. The gmirror(8) utility should be used for control of this class.
There is no manual page yet, but I'm working on it with keramida@.

Many useful tests provided by:	simon (thank you!)
Some ideas from:		scottl, simon, phk
2004-07-30 23:13:45 +00:00
pjd
e2709c0cfc Remove the old geom_mirror class.
Approved by:	phk
2004-07-30 22:50:21 +00:00
phk
2d868d02cf Put a version element in the VFS filesystem configuration structure
and refuse initializing filesystems with a wrong version.  This will
aid maintenance activites on the 5-stable branch.

s/vfs_mount/vfs_omount/

s/vfs_nmount/vfs_mount/

Name our filesystems mount function consistently.

Eliminate the namiedata argument to both vfs_mount and vfs_omount.
It was originally there to save stack space.  A few places abused
it to get hold of some credentials to pass around.  Effectively
it is unused.

Reorganize the root filesystem selection code.
2004-07-30 22:08:52 +00:00
njl
941a15ae99 Drop WARNS down to 3 since sparc64 still has justified complaints about
bad casts.

Noticed by:	johan
2004-07-30 21:43:21 +00:00
njl
ada4725d0c Clean up some more casts. Note that the an_fudge alignment hack for
struct an_ltv_stats needs to be fixed.  It has been here since this was
imported.
2004-07-30 21:42:39 +00:00
alc
9b295c2fd9 - Push down the acquisition and release of Giant into pmap_protect() on
those architectures without pmap locking.
 - Eliminate the acquisition and release of Giant from vm_map_protect().

(Translation: mprotect(2) runs to completion without touching Giant on
alpha, amd64, i386 and ia64.)
2004-07-30 20:38:30 +00:00
alc
6aaed2f8ea Giant is no longer required by vm_waitproc() and vmspace_exitfree().
Eliminate it acquisition and release around vm_waitproc() in kern_wait().
2004-07-30 20:31:02 +00:00
alc
d41b071100 - Add pmap locking to ia64's pmap_enter() and pmap_enter_quick(). (This
brings ia64 to parity with alpha, amd64, and i386 in this area.)
 - Prevent a race in pmap_find_pte(): If pmap_find_pte() sleeps in
   uma_zalloc(), another thread could allocate a pte at the same address.
   Instead, sleep at a higher level and retry the lookup before retrying
   the allocation.

Reviewed and tested by:	marcel@
2004-07-30 20:25:12 +00:00
pjd
6e57ee9a4c Nuke geom_mirror class. New geom_mirror class is in the way.
Approved by:	phk
2004-07-30 19:59:36 +00:00
pjd
0560d38991 Allow to create slices on providers from class LABEL and class NOP.
This is really ugly way to do this, but there is no other way for now.
It allows to mount root file system from providers which belong to
those classes.

Approved by:	phk
2004-07-30 19:55:12 +00:00
yar
4cacae89d9 Ditto for (gid_t). 2004-07-30 17:30:07 +00:00
yar
dc8c8c95c0 Kill casts to (uid_t) obviously left from the K&R era.
Prototyping library functions in header files has rendered
them superfluous.
2004-07-30 17:27:23 +00:00
mtm
cc10a9c33b Finish cleanup of rc.d/netif. It's now possible to start/stop more
than one interface from the command line:
	# /etc/rc.d/netif start bfe0 xl0
It's also possible to restart an interface(s):
	# /etc/rc.d/netif restart bfe0

This required some changes to rc.subr(8) so that if the start/stop commands
are overidden the rest of the command line (after the start/stop/etc... cmd)
is passed through to the subroutines.
2004-07-30 17:19:35 +00:00
yar
8839880434 Add a comment to explain that the loop around the call to bind(2)
is not a hack, but it has a clear purpose.
2004-07-30 17:18:57 +00:00