Commit Graph

13 Commits

Author SHA1 Message Date
gpalmer
b7df1cd597 Clean up -Wunused warnings.
Reviewed by:		bde
1996-06-12 05:11:41 +00:00
asami
999536bc13 Add #ifndef/#endif around the "#define CCD_OFFSET 16", so you can override
it in your kernel config file.

Requested (in essence) by:	phk
1996-05-13 09:17:42 +00:00
asami
490d77aab7 Leave 16 lines in front of each component partition. It's now safe to
use sd87a or sd237e even if they start at the beginning of the slice.

You can also use sd85c if you prefer, although you need to change the
type field in the disklabel to "4.2BSD".
1996-05-13 08:38:15 +00:00
asami
0b70ab7c27 Add missing "int" to static var. 1996-04-24 09:42:22 +00:00
asami
52026f0754 Change how mirror writes are handled, according to the discussion on the
mailing list.

When initiating a write, ccdbuffer() returns two "struct ccdbuf *"s
linked together by the cb_mirror field.  "cb_pflags &
CCDPF_MIRROR_DONE" is set to 0 on both of them.

When a component returns to ccdiodone(), it checks if "cb_pflags &
CCDPF_MIRROR_DONE" is set or not.  If not, it sets the partner's
flag and returns.  If it is, it means its partner has already
returned, so it will go to the regular cleanup (which is in the
fallthrough code).

There should be no performance or functionality changes unless the
higher-level scsi driver does something with the resid value.  The change
is purely aesthetical and prepares us for the parity implementation.
1996-03-26 02:29:11 +00:00
asami
052fb3d39d Ported to 2.2-current. Uses [bc]devsw_add(), and is also now a proper
pseudo-device.

Doesn't use devfs correctly yet.
1996-03-21 04:13:25 +00:00
asami
e1f1f5c0ef Fix one warning and fix one bug found while looking at another warning (but
caused by a different reason):

. #ifndef __FreeBSD__ around check for negative size, FreeBSD size_t is
  unsigned

. Disable mirror/parity if interleave size is 0 (i.e., serial concatenation).
1996-01-31 11:25:46 +00:00
asami
b56cdef07e Mirror support. When CCDF_MIRROR is set:
(1) The reads are always done from the first n/2 disks.

(2) Each write is done twice, to the "data" disk (in the first half) and
    the "mirror" disk (in the second half).

ccdbuffer() now takes an extra argument (struct ccdbuf **) and stores
the pointer to ccdbuf in there.  In case of a mirrored write, it
allocates and stores two pointers.  The "residual" is also doubled
for mirrored writes so that ccdiodone() can correctly tell when all
the writes are done.
1996-01-31 03:28:21 +00:00
asami
27bb6ec9bc Prepare for adding mirroring. Check for flags (mirror forces uniform),
reduce the size to half, etc.  Right now it only uses the first n/2 disks
for both read and write.
1996-01-30 22:34:53 +00:00
asami
3d1dd0dbb2 Prepare to add support for parity. Report the post-parity size,
allocate space around parity blocks.
1996-01-02 23:32:54 +00:00
asami
5f452dab59 Added $Id$. 1995-12-28 00:22:45 +00:00
asami
402900f9e3 Changes to make it work on FreeBSD-2.1. 1995-12-27 10:53:21 +00:00
asami
eb92236d2f ccd.c and ccd.4 from NetBSD-current circa 12/25/95. 1995-12-27 10:49:19 +00:00