Commit Graph

2797 Commits

Author SHA1 Message Date
Greg Lehey 3438940a01 Add note that a change needs backing out. 1999-08-15 02:31:19 +00:00
Greg Lehey 3764607a6e Ensure that we can't create two different drives on the same
partition.

Reported-by:	Remy Nonnenmacher <remy@synx.com>
1999-08-15 02:30:34 +00:00
Greg Lehey 60402eb12d Add 'initialized' state for subdisks. After initializing, the subdisk
goes into initialized state, not 'up'.  This makes it easier to ensure
consistency in multi-plex volumes.

update_plex_state: redo transitions from empty and initialized
subdisks to up or reviving, depending on the number of plexes.

Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-15 02:29:14 +00:00
Bill Paul 2b028af745 Minor glitch in ti_newbuf_jumbo(): m_adj() was being called on
m instead of m_new.

Submitted by: Kenneth D. Merry <ken@kdm.org>
1999-08-14 15:45:03 +00:00
Poul-Henning Kamp 49ff4debd3 Spring cleaning around strategy and disklabels/slices:
Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout.
please see comment in sys/conf.h about the flag argument.

Remove strategy argument from all the diskslice/label/bad144
implementations, it should be found from the dev_t.

Remove bogus and unused strategy1 routines.

Remove open/close arguments from dssize().  Pick them up from dev_t.

Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
1999-08-14 11:40:51 +00:00
Greg Lehey af78609425 Tidy up comments.
Add definitions for VINUM_BLOCK_PLEX and VINUM_CHAR_PLEX.

struct plex: add lock-related variables.

struct rangelock: add variables.
1999-08-14 06:31:37 +00:00
Greg Lehey c515a27bbd Clean up comments.
Don't return "can't do it" when the user requests a state change to
the current state.  This previously caused silly messages like "Can't
start <foo>: invalid argument", when in fact <foo> was already
started.

set_plex_state: don't set state for non-existent plexes.

update_plex_status: as long as we have initializing subdisks, we're
		    initializing.
1999-08-14 06:30:56 +00:00
Greg Lehey b8962e0ff8 Clean up some comments.
Move the declaration of freerq() to request.h.

logrq: add support for lock events.

vinumstart: solve a problem where removing a plex from an active
	    volume could cause attempts to access non-existent plexes.

launch_requests: don't set a request group active until we're sure we
		 can launch it.  This caused some hangs under unusual
		 circumstances.

bre: don't set XFR_BAD_SUBDISK if we're not going to use it.

build_read_request: correct recovery, which caused some hangs under
		    (other) unusual circumstances.

build_rq_buffer: don't set bp->b_dev if we don't have a dev.

sdio: clean up, remove obsolete code.

deallocrqg: unlock any locks the rqg may have.
1999-08-14 06:30:15 +00:00
Greg Lehey a87d57a3e8 Tidy up some comments.
bre5:
  Shorten some lines.

  Desired-by:  bde

  If we're reading from a short plex, return EOF indication.

  Always lock the stripe before starting a transfer.  Hopefully the
  current version will solve some data integrity problems that have
  been reported with degraded RAID-5 plexes.

  Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:29:25 +00:00
Greg Lehey e5738c9f66 Add keypairs replace and readpol. These got forgotten in a previous
commit, but since they don't work yet, nobody noticed.
1999-08-14 06:28:48 +00:00
Greg Lehey 998115ba43 rewrite lockrange and unlockrange. Hopefully the current version will
solve some data integrity problems that have been reported with
degraded RAID-5 plexes.

Reported-by:	Bernd Walter <ticso@cicely.de>
		Remy Nonnenmacher <remy@synx.com>
1999-08-14 06:28:21 +00:00
Greg Lehey 56a39b0546 Add hotspare keyword. 1999-08-14 06:27:52 +00:00
Greg Lehey 55eecd1064 vinumioctl: add ioctls for raw subdisks and plexes. Remove code for
drives (we refuse to touch drives, that's the disk driver's business).
1999-08-14 06:27:25 +00:00
Greg Lehey 4fd49b9f73 Remove some XXX comments (they're not really gone, just invisible).
Tidy other comments.

open_drive: don't call set_drive_state if we decide to take it down.
This could help avoid some race conditions with the daemon.

init_drive: don't set the drive down, we'll let close_locked_drive do
that.

close_locked_drive: set drive state to down without calling
set_drive_state.  This could help avoid some race conditions with the
daemon.

driveio: remove the function, it wasn't being used.

get_volume_label: remove volume dependencies so that we can return a
label for plexes and subdisks as well.  What a kludge.
1999-08-14 06:26:32 +00:00
Greg Lehey 6dd671ea60 Remove some XXX comments (they're not really gone, just invisible).
Remove declarations for freerq and free_rqg.

Remove DEBUG_RESID code.

freerq: check whether the request is holding a lock, free if so.

free_rqg: remove.  It wasn't being used any more.

Change the Debugger calls to panics.
1999-08-14 06:25:52 +00:00
Greg Lehey 5425c19ce4 Change definitions for get_volume_label, lockrange.
Move definition for unlockrange to request.h (it now contains
request-related parameters).

Add sddownstate.
1999-08-14 06:25:14 +00:00
Greg Lehey b7904c2bf9 Add code which someday will help support hot spares.
checkdiskconfig(): remove.  It didn't make any sense to complain about
kernel keywords in user config files; it just made it more difficult
to convert.  Now we ignore kernel keywords if we're not in kernel
mode.

get_empty_sd: initialize sectors.

free_drive: don't close if we don't have a vp.  Maybe this will help
fix the problem that peter had, but I wouldn't count on it.

config_plex: If the plex is RAID-5, give it a rangelock structure.

start_config: Reset current drive, plex and volume so that a new
'create' command doesn't get long-dead defaults.
1999-08-14 06:24:34 +00:00
Greg Lehey 466c1060d9 vinumopen: add code for opening raw plexes. Volume-related plex
devices will probably die a death soon (yes, DES, that's correct
usage).
1999-08-14 06:22:15 +00:00
Greg Lehey 98256dfef8 Clarify some comments.
struct rqelement, enum rqinfo_type, struct rqinfo, union rqinfou: add
lock requests.

Add declarations for freerq and unlockrange.  Since they include
request structures, they can't go in vinumext.h
1999-08-14 06:21:45 +00:00
Dmitrij Tejblum e9e879c34d Fix a warning on the alpha. 1999-08-13 16:17:54 +00:00
Poul-Henning Kamp 7dc5cd047f The bdevsw() and cdevsw() are now identical, so kill the former. 1999-08-13 10:29:38 +00:00
Nick Hibma e0f5b7a3be Protect the file interface against disconnects. 1999-08-12 18:55:41 +00:00
Søren Schmidt f63c7e582a Support DMA on ATAPI devices (finally).
This makes my system use only ~5% CPU on reading 4.5Mbyte/sec
from a CDROM, which before was limitted to 1.8Mbyte/sec due
to 100% CPU load..
1999-08-10 21:59:58 +00:00
Bill Paul ee67e42e43 Small tweak: remember to free the tx ring data (which is malloc()ed) if
we have to bail out of vr_attach().
1999-08-10 21:12:11 +00:00
Bill Paul 08339b4fa4 Convert the VIA Rhine driver to newbus and set it up to be compiled as
a module. Also modified the code to work on FreeBSD/alpha and added
device vr0 to the alpha GENERIC config.

While I was in the neighborhood, I noticed that I was still using
#define NFPX 1 in all of the Makefiles that I'd copied from the fxp
module. I don't really use #define Nfoo X so it didn't matter, but
I decided to customize this correctly anyway.
1999-08-10 17:15:20 +00:00
Matthew N. Dodd 2825e76714 Add support for the Am79C978. (AMD PCHome/PCI Ethernet adapter)
See: http://www.amd.com/products/npd/overview/homenetworking/intro.html

PR: kern/12275
Submitted by: Robert Watson <robert@cyrus.watson.org>
1999-08-10 01:03:51 +00:00
Peter Wemm a063132590 A little more tidying up. 1999-08-09 14:43:39 +00:00
Peter Wemm b2368001b4 Expand a heap of macros that obscure readability and are no longer needed
here, and do a bit of general tidy up.
1999-08-09 14:15:46 +00:00
Peter Wemm ac6b4b7c14 More pre-lite2 support zapped and some more tidy-up. 1999-08-09 13:24:55 +00:00
Peter Wemm 48cadfb15e Unifdef -D__FreeBSD__ - and remove pre-lite2 support. 1999-08-09 13:15:53 +00:00
Peter Wemm d1292ac4bc Unifdef -U__NetBSD__ 1999-08-09 13:07:37 +00:00
Peter Wemm 28acbab4e0 Unifdef -U__bsdi__ 1999-08-09 13:01:58 +00:00
Peter Wemm fff7a5bef5 s/Id/FreeBSD/ 1999-08-09 12:52:49 +00:00
Peter Wemm b46f22127f Strip __FreeBSD_version >= 300000 conditionals. 1999-08-09 12:50:12 +00:00
Peter Wemm 3d3bfc5db5 Merge changes from NetBSD rev 1.82 -> 1.86 via vendor branch.
Among the changes:  1.84: support compex 4-port cards.
1999-08-09 12:29:29 +00:00
Poul-Henning Kamp f1fe3bf115 make alpha compile again. 1999-08-09 11:02:45 +00:00
Poul-Henning Kamp ce9edcf5b5 Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
1999-08-09 10:35:05 +00:00
Poul-Henning Kamp 1a03ce6c63 Remove compile time limit on number of devices. 1999-08-08 22:25:46 +00:00
Poul-Henning Kamp fca3f34ff8 Passing the unit number to an interrupt routing is kind of narrowminded,
add a way to get the entire struct ppb_device back.
1999-08-08 22:25:21 +00:00
Poul-Henning Kamp fa81b03de6 Remove compiled in limit on number of devices. 1999-08-08 22:01:50 +00:00
Poul-Henning Kamp 57ad459b75 register tty devices so they will look right in pstat. 1999-08-08 21:35:17 +00:00
Poul-Henning Kamp 4cb4c215e5 Allocate and register struct tty on the fly. 1999-08-08 20:25:14 +00:00
Peter Wemm 61ec30585f s/TULUP/TULIP/ - from vendor branch. 1999-08-08 19:56:06 +00:00
Poul-Henning Kamp 0ef1c82630 Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,
a few lines into <sys/vnode.h>.

Add a few fields to struct specinfo, paving the way for the fun part.
1999-08-08 18:43:05 +00:00
Bruce Evans 890c628e79 Fixed all printf format errors reported by gcc -Wformat on i386's:
- %q -> %ll.

Fixed nearby errors not reported by gcc -Wformat on i386's:
- don't assume that the promotion of [u_]int64_t is [u_]quad_t.
- don't use signed formats for unsigned args.
1999-08-08 14:11:03 +00:00
Greg Lehey 1943d3438c Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>
1999-08-07 08:22:49 +00:00
Greg Lehey 5b19bbcb6f Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

Define VINUM_BLOCK_SD and VINUM_CHAR_SD macros to create raw subdisk
device numbers.

Add VF_HOTSPARE flag.
1999-08-07 08:15:25 +00:00
Greg Lehey bbc227eaa9 Update a comment. 1999-08-07 08:14:44 +00:00
Greg Lehey 1c49cd396f Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

update_plex_state:
  If any subdisk in the plex is initializing, set the plex to
  initializing state.  This gets rid of the ugly corrupt/degraded/up
  transitions which previously occurred.

  Desired-by: Steve Taylor <staylor@cybernet.com>

sddownstate:
  Add new function, used by checksdstate.

checksdstate:
  Let sddownstate decide what status to return.
1999-08-07 08:14:01 +00:00
Greg Lehey 780f9fa3e3 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

logrq: save device major and minor numbers to compensate for lost
  dev_t.

launch_requests: Don't issue requests which are marked
  XFR_BAD_SUBDISK.  This may make things easier in bre().

bre:
  Rearrange.
  - Change some comments
  - Recognize holes in plex structure.  Formerly this could lead to
    incorrect write to the plex.  Return REQUEST_DEGRADED on a read
    request, but carry on to the bitter end on a write request, and
    mark the requests for the inaccessible subdisks with
    XFR_BAD_SUBDISK.
  - return REQUEST_EOF if the requested transfer goes beyond the end
    of the plex.  This is not an error, since other plexes may go
    further into the volume address space.

build_read_request:
  Handle REQUEST_DEGRADED returned from bre().

sdio:
  Lock buffer before issuing the requests.
1999-08-07 08:13:23 +00:00