Commit Graph

256 Commits

Author SHA1 Message Date
alfred
be3a1757c0 remove PCATCH from a tsleep that isn't checked for (avoid infinite loop).
this needs to be revisited.
1999-11-18 08:57:03 +00:00
grog
c30c23e035 Emergency fix to stop world breakage.
Broken-by:	archie
1999-11-03 20:04:00 +00:00
archie
52125b012d Change isspace() macro name to avoid conflict. 1999-11-02 22:42:56 +00:00
grog
5ccb30bf1f sdio_done:
Set the errors in the correct buffer header.

Inspection-provoked-by: Bernd Walter <ticso@cicely.de>
1999-10-17 23:56:47 +00:00
grog
a1894992f3 launch_requests:
Put splbio protection around the main launch loop.  We've seen cases where
  the bottom half was cutting off the branch on which we're sitting.

Experienced-by: Michael Reifenberger <root@nihil.plaut.de>
1999-10-17 23:55:10 +00:00
grog
6817b4ff2c Remove reference to obsolete initsd function.
This should have been committed yesterday.

Broke-world-for:	USW2 Root <root@usw2.freebsd.org>
1999-10-13 23:00:30 +00:00
grog
7e03845566 Change default revive block size to 60 kB (was 64 kB), and set a
maximum of 64 kB.

vinum_conf, struct drive: add fields for the current number of active
requests and the maximum ever active.

struct sd: Add fields for initialize progress.

struct mc: set the size of saved file names to MCFILENAMELEN instead
of the previous explicit constant.
1999-10-13 03:21:54 +00:00
grog
27e8167b0f Add glue for passing revive block size, and also for initializing a
subdisk.
1999-10-13 03:21:04 +00:00
grog
14c5b40d4b revive_block: Add a check for a too high revive block size. This is
possible now that vinum(8) can specify this size.

Add function initsd, which initializes a subdisk and optionally checks
that it really happened.
1999-10-13 03:20:11 +00:00
grog
1ded084e46 launch_requests:
limit the number of outstanding requests on a specific drive and
  overall.

  Change the way we set the active request count.  This enables us to
  start the requests without being in splbio for the duration, which
  could be very long for IDE drives in PIO mode.
1999-10-13 03:19:31 +00:00
grog
1f8a712f29 MMalloc: don't supply M_WAITOK when mallocing from an interrupt
context.  Be prepared to fail instead.

MMalloc, FFree: ensure that saved file names are properly terminated.
Use MCFILENAMELEN instead of the previous explicit constant.
1999-10-13 03:18:53 +00:00
grog
38685c9f83 struct vinum_ioctl_msg: Add fields verify (for initsd) and blocksize
(for revive and init).
1999-10-13 03:18:29 +00:00
grog
e312ef0ee4 Fix another instance of vinum_scandisk giving a request to the daemon
and then doing it itself, resulting in a panic downed drives.

Sleuth-work-by:	  Christopher Masto <chris@netmonger.net>

Remove dummy function initsd, which is now (implemented) in
vinumrevive.c

vinum_scandisk: Check that a drive is up before reading from it.  This
is probably excessive paranoia.
1999-10-13 03:17:59 +00:00
grog
7e55881dd6 Limit the number of outstanding requests on a specific drive and
overall.
1999-10-13 03:17:21 +00:00
grog
d00c77c723 Modify definition of Malloc: only M_WAITOK if we're not in an
interrupt context.
1999-10-13 03:16:56 +00:00
grog
886293e5aa Change the declaration of initsd. 1999-10-13 03:16:35 +00:00
grog
022ac88e0f Add some private storage so that we can queue requests in an interrupt
environment even if malloc fails.
1999-10-13 03:16:05 +00:00
n_hibma
279ad30025 Removal of sys/device.h
- Move intrhook stuff into kernel.h
- Remove all occurrences of #device <device.h>
- Add kernel.h were necessary (nowhere)
- delete device.h

This file contained the structures for cfdata (old style config) and is no
longer used. It was included by most drivers.

It confuses the remote debugger as the definition of 'struct device' in
device.h is found before the one in bus_private.h.
1999-10-05 21:19:41 +00:00
grog
0b4dce3508 struct plex: Add variables checkblock and rebuildblock to keep track
of parity check and rebuild operations.  This enables us
             to stop the operation and restart at a later time.

enum parityop: Trivial enum to decide what parityops() is going to do.
1999-09-28 22:58:07 +00:00
grog
ceed056964 revive_block: set b_resid correctly.
parityops: New function to check and rebuild RAID-5 parity blocks.
Not yet usable.
1999-09-28 22:57:29 +00:00
grog
6f15a47d21 logrq: add sdiodone case.
launch_requests: Remove debug code

sdio: Reformat log call.
1999-09-28 22:56:54 +00:00
grog
e26d973c1a Don't count iterations while waiting for a lock to become free. 1999-09-28 22:56:04 +00:00
grog
5a83a31cac Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:55:37 +00:00
grog
870bf32856 Reduce MAX_IOCTL_REPLY to 1024; the previous value was more than ioctl
could stand.

Define the correct return lengths for a number of ioctls.

Add ioctls VINUM_CHECKPARITY and VINUM_RESETPARITY, still to be fully
implemented.
1999-09-28 22:54:58 +00:00
grog
6f7810dec0 open_drive: Don't call set_drive_state to take a drive down, do it
ourselves.  This breaks a vicious circle which caused
            vinum to dereference a null vp if device nodes were
            missing.

Reported-by:	Brad Chisholm <sasblc@unx.sas.com>
		Alec Wolman <wolman@cs.washington.edu>

check_drive: Don't take a drive down if it's only referenced.

read_drive: Remove unused variable.
1999-09-28 22:46:39 +00:00
grog
0baa5f682a sdio_done: Log events if DEBUG_LASTREQS set. 1999-09-28 22:45:21 +00:00
grog
98afc1e9a0 Change remove_drive_entry
Add parityops
1999-09-28 22:43:59 +00:00
grog
555e3536e5 Remove some superfluous comments.
get_empty_volume: initialize plexes to -1 (not allocated)

remove_drive_entry:
  Remove recurse parameter (there's nothing below a drive in the hierarchy).
  Use remove_sd_entry to remove sds, don't do it ourselves.
  Log errors, don't throw rude remarks.

remove_plex_entry:
  Don't use plex->subdisks as a loop limit, it gets changed in the
     loop.  This caused some removals to only remove half the subdisks.
  Change logging of some "impossible" situations.

remove_volume_entry:
  Use remove_plex_entry to remove plexes, don't do it ourselves.

update_sd_config:
  Use set_sd_state to do the work.
1999-09-28 22:43:07 +00:00
grog
4ce980b705 Minor formatting changes (7th attempt) 1999-09-28 22:42:06 +00:00
grog
1df3ed8d59 Add loginfo type for sdiodone. 1999-09-28 22:27:10 +00:00
phk
e9e0512210 Remove five now unused fields from struct cdevsw. They should never
have been there in the first place.  A GENERIC kernel shrinks almost 1k.

Add a slightly different safetybelt under nostop for tty drivers.

Add some missing FreeBSD tags
1999-09-25 18:24:47 +00:00
julian
5c78e7345a Changes to centralise the default blocksize behaviour.
More likely to follow.

Submitted by: phk@freebsd.org
1999-09-09 19:08:44 +00:00
grog
82b81eaa6f struct rqgroup: put 0-length array at the end. Make mental note not
to write such crap again.

Spotted-by:	Parag Patel <parag@cgt.com>
1999-09-05 06:32:20 +00:00
julian
fd9cb11e53 Revert a bunch of contraversial changes by PHK. After
a quick think and discussion among various people some form of some of
these changes will probably be recommitted.

The reversion requested was requested by dg while discussions proceed.
PHK has indicated that he can live with this, and it has been agreed
that some form of some of these changes may return shortly after further
discussion.
1999-09-03 05:16:59 +00:00
julian
60f0adf39e remove some out-of-scope DEVFS references..
(don't worry greg.. cosmetic only)
1999-09-03 05:08:05 +00:00
grog
087bc8c4fb Reverse MFC of revision 1.5.2.7:
Remove a rather embarrassing race condition.

Egged-on-by:	alfred
1999-09-03 01:37:26 +00:00
phk
216936ca6d Make bdev userland access work like cdev userland access unless
the highly non-recommended option ALLOW_BDEV_ACCESS is used.

(bdev access is evil because you don't get write errors reported.)

Kill si_bsize_best before it kills Matt :-)

Use the specfs routines rather having cloned copies in devfs.
1999-08-30 07:56:23 +00:00
grog
1bd06cee6e Initialize the si_bsize fields of the new dev structure. This fixes
some swapper problems analogous to those experienced with ccd.

This fix is a kludge: since we currently don't track the "sector size"
in a volume label, we guess a worst case (4 kB, as used by vnode
devices).  If the concept of sector size is here to stay, I'll make
some changes to track the "sector size" of a volume.  This will
probably be the maximum of the sector sizes of all component drives,
but things could get ugly if we start allowing non-standard sector
sizes such as 524 bytes.

Unkludged-version-submitted-by:	phk
1999-08-29 01:41:53 +00:00
peter
3b842d34e8 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
grog
6cb95ba779 read_drive: Remove references to vp->v_lastr, which is going away.
Reviewed-by:	dillon
1999-08-26 03:27:21 +00:00
grog
f94d5d264d complete_rqe: explicitly reinitialize b.b_iodone. This shouldn't have
changed, but we've seen some weird cases of b_iodone
	      being NULL, and they don't make any sense.

Suffered-by:  Bernd Walter <ticso@cicely.de>
1999-08-26 03:26:39 +00:00
grog
1c73eada88 config_plex: don't allocate a rangelock struct.
lockrange: correctly expand rangelock struct, including expanding a
	   null struct.  Previously lockrange would attempt to lock a
	   NULL pointer under these circumstances.

Reported-by:	Ian Freislich <iang@uunet.co.za>
1999-08-26 03:25:38 +00:00
grog
685c3b6c7f set_sd_state: Correct the conditions for bringing up empty or
initialized subdisks.

Tidy up some comments.

Eliminate sddownstate(); it wasn't being used any more.  Return
REQUEST_DOWN instead.

Add setstate_by_force() to implement the VINUM_SETSTATE_FORCE ioctl
for diddling individual object states.  This is a repair tool which
can also be used for panicing the system.  Use with utmost care if at
all.
1999-08-24 02:29:41 +00:00
grog
ce932f0fb9 Lock stripes of striped and RAID-5 plexes before writing them. This
avoids a race condition where multiple RAID-5 subdisks are being
revived at the same time.  The locks should also prevent conflicts
with user requests on concatenated and striped plexes, but this needs
more work.

Tidy up some comments.
1999-08-24 02:28:37 +00:00
grog
5ced956eda Add keywords setstate, checkparity, rebuildparity. 1999-08-24 02:27:45 +00:00
grog
65014fdc63 Add VINUM_SETSTATE_FORCE ioctl for diddling individual object states.
This is a repair tool which can also be used for panicing the system.
Use with utmost care if at all.
1999-08-24 02:26:15 +00:00
grog
b4cf138bbb format_config: print preferred plex correctly. 1999-08-24 02:24:47 +00:00
grog
a7b84f6d05 Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
1999-08-24 02:23:21 +00:00
grog
9e831b88aa Add declaration for vinum_setstate_by_force. 1999-08-24 02:21:46 +00:00
grog
f177f6fd7f give_sd_to_drive: If we don't have space, deallocate the subdisk.
Previously we could end up with a valid subdisk
                  entry pointing to offset -1 on the drive.
1999-08-24 02:20:30 +00:00