| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The RAID1C discipline encrypts data like the CRYPTO discipline, and accepts
multiple chunks during creation and assembly like the RAID1 discipline.
To deal with failing disks a RAID1C volume may be assembled with a smaller
number of chunks than the volume was created with. The volume will then come
up in degraded state. If the volume is now detached and assembled again with
the correct number of chunks, any re-added chunks will require a rebuild.
Consequently, assembling RAID1C volumes requires careful attention to the
chunks passed via 'bioctl -l'. If a chunk is accidentally omitted from the
command line during volume assembly, then this chunk will need to be rebuilt.
At least one known-good chunk is required in order to assemble the volume.
Like CRYPTO, RAID1C supports passphrase and key-disk authentication.
Key-disk based volumes are assembled automatically if the key disk is present
while the system is booting up.
Unlike CRYPTO and RAID1, there is no boot support for RAID1C yet.
RAID1C largely reuses existing code of RAID1 and CRYPTO disciplines.
At present RAID1C's discipline-specific data structure is shared with that
of the CRYPTO discipline to allow re-use of existing CRYPTO code. A custom
RAID1C data structure would require CRYPTO code to access struct sr_crypto
via a pointer instead of via a member field of struct sr_discipline.
ok jsing@
|
|
|
|
|
|
|
|
|
| |
These wait loops block for up to 1 tick per iteration. I think they
will continue to work if we block for at least 1ms per iteration.
My gut says that these could be rewritten not to spin and instead to
await a wakeup(9) from the other thread, but I think that would
involve making softraid(4) more MP-safe.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So nuke 'cmdstore' and remove the '*'
from cmd. Take the address of cmd as required by the various casts.
No intentional functional change.
luna88k test by aoyama@, sparc64 test by jmatthew@
Identification of 2009's last *cmd use and ok jmatthew@
|
|
|
|
|
| |
responses. This is what the SCSI specifications say is the correct value and
already used in several cases.
|
| |
|
|
|
|
| |
initialize the 'version' field. Not numbers.
|
|
|
|
|
|
| |
struct scsi_rw_10.
ok gnezdo@ jmatthew@ (who also did sparc64 compile test)
|
|
|
|
|
|
|
| |
fields to struct scsibus_attach_args. Nuke the struct scsi_link *
(saa_sc_link) in scaibus_attach_args.
Explicitly initialize each field in scsibus_attach_args variables.
|
|
|
|
|
|
|
| |
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.
Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).
|
|
|
|
|
|
|
|
| |
In sparc64 autoconf access 'luns' via sb_luns and 'adapter_buswidth'
via sb_adapter_buswidth.
Removes last post-config uses of the copies of bus related
information in scsi_link.
|
|
|
|
|
|
|
|
|
| |
Spotted while reading the code, we overallocate quite a bit:
(gdb) p sizeof(struct sr_meta_crypto) - sizeof(struct sr_meta_boot)
$1 = 2312
OK jsing
|
|
|
|
| |
statement. All to make upcoming diff(s) smaller and easier to read.
|
| |
|
|
|
|
| |
immediately before initializing the only field in the struct.
|
|
|
|
|
|
|
| |
aassigned to adapter_buswidth to indicate the adapter is not a target
on the bus.
ok dlg@ as part of a larger diff.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sparc64 installboot(8) on softraid(4) with too large files, e.g. unstripped
builds, fails poorly with "installboot: softraid installboot failed".
This is due to the BIOCINSTALLBOOT ioctl(2) returing the default EINVAL
rather than using softraid's sr_error() interface properly; additionally,
installboot does not check for such message from the bio(4) layer.
Make the kernel generate "boot block too large" and "boot loader too large"
messages for softraid devices and have installboot act upon them analogous
to bioctl(8), by adapting its bio_status() into the new sr_status() helper.
Input, reminder to look at bioctl, same kernel diff from, OK jsing
|
|
|
|
|
| |
Harmless since free(9) first checks that the pointer is not NULL.
ok krw@
|
|
|
|
|
|
| |
the vnode because `open' is true.
OK deraadt@, anton@
|
|
|
|
| |
ok kn@ deraadt@
|
|
|
|
|
|
|
|
| |
nothing at all. MAXPHYS will be applied in minphys() and nothing at
all, well, doesn't do anything.
Also remove any '#define <blah> MAXPHYS' statements used solely to
disguise MAXPHYS in said functions.
|
|
|
|
|
|
|
| |
system minphys(). scsi_minphys() will do that and cd/sd/st will call
scsi_minphys().
ok jmatthew@ as part of larger diff
|
| |
|
|
|
|
|
|
| |
Store the size of struct sr_workunit depending on the softraid type
in struct sr_discipline.
testing and OK jan@
|
|
|
|
| |
OK jan@, "yes please" tedu@
|
|
|
|
| |
OK tedu@
|
|
|
|
|
|
| |
unnecessary because curproc always does the locking.
OK mpi@
|
|
|
|
|
|
|
|
| |
output to the disks.
This is part of a larger suspend/resume filesystem-safety diff, which
has been worked on for a couple of months already. Tests by job, krw,
beck, benno, and others. Sometimes even by snapshot users...
|
|
|
|
| |
ok jsing@ tb@
|
|
|
|
| |
ok deraadt
|
| |
|
|
|
|
|
| |
assembled into a volume, to enure the on-disk
metadata and the in-memory metadata agree.
|
|
|
|
|
| |
time; the aggressive mountpoint destruction seems to hit insane
use-after-frees when we are already far on the way down.
|
|
|
|
|
|
|
|
|
| |
type on the chunks is not the same, we don't actually care because we
are going to clear their metadata anyway, so don't error out. This
allows assembling a new RAID based on a drive that is zeroed and one
that used to be part of a softraid in its previous life.
ok jsing@
|
|
|
|
|
|
| |
the sensor does not show the drive state as "unknown".
ok phessler@
|
|
|
|
|
|
| |
doesnt make sense to use M_CANFAIL flag.
ok dlg jsing
|
|
|
|
|
|
|
| |
is at least one bio status message. It is a much nicer user experience when
we properly report failures, however in the case that we fail to do this,
getting an errno back from the ioctl is somewhat better than simply
printing "unknown error" from bioctl(8).
|
|
|
|
|
|
|
|
|
|
| |
softraid volume and backing disk when i/o errors occur.
Original issue reported by Paul de Weerd.
Suggestions from jsing@.
ok deraadt@ mikeb@
|
|
|
|
| |
OK jsg@
|
|
|
|
|
| |
failure as early as possible.
ok mlarkin claudio
|
|
|
|
|
|
|
| |
in progress. This eliminates the spurious and harmless "0% done" message
in the output of 'bioctl softraid0' reported by various on misc.
ok jsing
|
|
|
|
|
|
| |
Problem found by Michael McConville.
Tested & ok stsp@
|
|
|
|
|
|
| |
having five copies of the same code.
ok krw@
|
|
|
|
|
|
|
|
|
| |
defined. Carrying on is pointless. And will currently cause a NULL
pointer deref anyway.
NULL deref found by mmcc@ and his friend clang.
ok deraadt@
|
| |
|
|
|
|
|
|
|
|
| |
greater than the sector size of the softraid volume. i.e. 512-byte
hot spares should work on 4096-byte volumes but 4096-byte hotspares
will not work on 512-byte volumes.
Pointed out, errors corrected and ok jsing@
|
|
|
|
|
|
| |
replaced by comment for first chunk of code.
Pointed out by jsing@.
|
|
|
|
|
| |
chunk and perhaps save the next person reading the code some
confusion.
|
|
|
|
|
| |
'cid = i;' when break'ing. Makes code consistent with same search
later. No functional change and shrinks later functional diff.
|
|
|
|
|
| |
chunks more obviously the same. Reduces size of upcoming diff. No
functional change.
|