Age | Commit message (Collapse) | Author |
|
|
|
ok krw@
|
|
|
|
discipline data structure. To be used with an upcoming diff.
|
|
a crypto volume when it is assembling it.
|
|
during volume assembly.
|
|
size of 512 bytes - any other size is not currently supported.
ok krw@
|
|
to provide useful feedback, rather than reporting an ioctl failure and
leaving the user to consult dmesg. For now we continue to print most things
to the console, even if the message is a result of an ioctl.
|
|
from walking an uninitialised list if we fail to read the key disk.
|
|
cover the no redundancy/no rebuild case. Use these for the AOE, crypto and
RAID 0 disciplines.
|
|
those that are needed by a specific discipline.
|
|
are if used with a key disk.
|
|
of splitting and rejoining the list.
|
|
will allow new optional metadata types to be added without needing to
change the softraid metadata version.
Note that this commit changes the softraid metadata version, however
an upgrade from older metadata is handled automatically. A full backup
prior to upgrading is still strongly recommended.
With feedback from stsp@ and marco.
|
|
metadata handling code. This will simplify upcoming changes.
|
|
ok deraadt matthew
|
|
Instead of allocating a crypto op and the optional dma buffer on each
and every io, preallocate a list of softraid crypto wus that contain a
buffer of the max size we will use (MAXPHYS). since we know the number
of openings we have in advance this means that on each io we just pick
one, shorten the list of crypto descs, init any values then do the io.
ok jsing (who provided many useful comments. he also provided a smarter way of
handling the cryptop lists which is not in this diff but will be implemented
soonish), marco@.
dlg@ pointed out that this should probably use iopools but letting
disciplines allocate their own iopool involves more softraid rejigging
that will have to be done first. For now this is sufficient.
|
|
ok deraadt@
|
|
1) Allocating with M_WAITOK, checking for NULL, and calling panic() is
pointless (malloc() will panic if it can't allocate) so remove the check
and the call.
2) Allocating with M_WAITOK, checking for NULL, and then gracefully
handling failure to allocate is pointless. Instead also pass M_CANFAIL
so malloc() doesn't panic so we can actually handle it gracefully.
1) was done using Coccinelle.
Input from oga.
ok miod.
|
|
message if the key disk cannot be opened. ok marco (some time ago)
|
|
to panic if we couldn't allocate memory for crypto descriptors;
tested by dcoppa, ok marco
|
|
|
|
ok dlg@ marco@
|
|
|
|
|
|
ok marco
|
|
prodded and ok deraadt
|
|
ok marco
|
|
call while in interrupt context.
Contains an additional spl dance as found by thib.
Tested by many opn various arches. Note that raid 0/4/5/6 have not been
moved over yet.
|
|
|
|
PR_WAITOK not being set. While here add a diagnostic check for malloc.
|
|
curproc. A bunch of callers were passing in 0 (not even NULL, 0) as this
pointer, which was fine until the called vnode function tried to do
something with it. Typically, this code was then copy/pasted to various
parts of the tree.
Accept the facts of life and switch all of these over to passing curproc
for now until the argument can be removed.
Discovered by stsp trying to create a softraid on top of a vnd, which
crashed with a NULL deref in vndioctl.
softraid bits tested by mikeb and jsing. raidframe bits tested by pea,
matthieu and naddy. The rest tested by at least thib, jsing and myself.
ok thib@, jsing@.
|
|
ok marco@
|
|
metadata. This allows us to implement seamless transitions from the
previous metadata version to the current version, avoiding the need to
recreate the softraid volume.
Joint work with marco@ during c2k10.
ok marco@
|
|
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include
<sys/dkio.h> to the places that actually want and use the disk
ioctls.
this became an issue when krw@'s X build failed when he was testing
a change to dkio.h.
tested by krw@
help from and ok miod@
|
|
crypto optional metadata.
ok marco@
|
|
optional metadata per volume and discipline specific optional metadata
processing.
ok marco@
|
|
error path.
Found by jsg@ using the clang static analyser.
|
|
Also add a new optional metadata type for boot data. This is the first
step (of many) towards being able to boot from softraid volumes.
WARNING: This version of the softraid metadata is not compatible with
previous versions. As a result, any softraid volumes created with older
kernels will not assemble. Data on existing softraid volumes should be
backed up before upgrading. The volume should then be recreated and the
data restored.
ok marco@
|
|
else cares so it's just noise. Drivers that actually look at ITSDONE
are unchanged.
ok marco@ (for his files) dlg@ beck@
|
|
ok marco@
|
|
without using a passphrase - instead the encryption mask key is stored on
the specified key disk partition (ideally being one on a removable device).
This also enables automatic assembly of crypto volumes at boot time.
ok marco@
|
|
"in, in, in!" marco@
|
|
"shiny!!" marco@
|
|
you backup your data and lock up your pets prior to using this.
Tested by todd@
ok marco@
|
|
ok marco@
|
|
d_open/d_close.
tested by many, ok jsing, thib, krw
|
|
|
|
|
|
Found by LLVM/Clang Static Analyzer.
ok marco@
|