History log of /openbsd-src/sys/dev/softraid.c (Results 1 – 25 of 433)
Revision Date Author Comments
# a1d6bc77 08-Jan-2025 lucas <lucas@openbsd.org>

Teach sr_hibernate_io to handle HIB_DONE.

Rely on the fact that HIB_DONE is called with all zero'd arguments
besides the dev and op, and pass down those same arguments to the
underlying device.

Thi

Teach sr_hibernate_io to handle HIB_DONE.

Rely on the fact that HIB_DONE is called with all zero'd arguments
besides the dev and op, and pass down those same arguments to the
underlying device.

This allows for reenabling HIB_DONE return value check in
kern/subr_hibernate.c.

"that looks correct" deraadt
ok mglocker

show more ...


# 52ba1438 24-Dec-2024 krw <krw@openbsd.org>

In comment explaining softraid's usage of hibernate iopage add nvme/ufshci/sdmmc
to list of devices implementing side-effect free i/o functions.


# 84e87b21 18-Aug-2024 phessler <phessler@openbsd.org>

unregister softraid sensors when the volumes are removed

From Sven M. Hallberg

tested and OK phessler@
OK mvs@


# 81fb472f 03-Feb-2024 beck <beck@openbsd.org>

Remove Softdep.

Softdep has been a no-op for some time now, this removes it to get
it out of the way.

Flensing mostly done in Talinn, with some help from krw@

ok deraadt@


# f7f48e9f 21-Dec-2022 kn <kn@openbsd.org>

Move duplicate code to new sr_find_discipline() helper

OK miod


# 63f9fccb 18-Dec-2022 kn <kn@openbsd.org>

Prevent detaching the boot volume

bioctl(8)'s -d has no sanity checks and happily "deletes" any volume,
whether currently in use or not.

For now, refuse to detach the boot volume as a (too) simple

Prevent detaching the boot volume

bioctl(8)'s -d has no sanity checks and happily "deletes" any volume,
whether currently in use or not.

For now, refuse to detach the boot volume as a (too) simple safety guard,
until proper logic around mounted file systems on top is implemented.

Found the hard way through "bioctl -d sd1" with sd1 hosting /, after which
it took both fsck(8) and installboot(8) from a miniroot USB to recover.

regress/sys/dev/softraid also triggers it if root is on softraid.

OK claudio op jsing

show more ...


# 81d2f916 11-Sep-2022 miod <miod@openbsd.org>

Remove the DKF_LABELVALID flag from struct disk. Instead, trust disk drivers
to always be able to provide a duid, and keep ignoring whole zero duids.

This fixes a race in vnd setup where the disk_at

Remove the DKF_LABELVALID flag from struct disk. Instead, trust disk drivers
to always be able to provide a duid, and keep ignoring whole zero duids.

This fixes a race in vnd setup where the disk_attach callback could run
before any I/O occurs on the vnd, thus not having a label available yet.

noticed by otto@ and kn@; ok kn@

show more ...


# 5886cc40 29-Aug-2022 stsp <stsp@openbsd.org>

Examine RAID-1C-specific softraid(4) meta-data when checking for
a key disk which is associated with a RAID-1C volume.

ok jsing@, style tweak + ok kn@


# a454aff3 16-Apr-2022 naddy <naddy@openbsd.org>

constify SCSI adapter entry points

ok krw@


# 7499e163 12-Apr-2022 semarie <semarie@openbsd.org>

struct vnode: document the protection required for manipulating v_numoutput

correct sr_rw() and sr_ccb_rw() to properly manipulate v_numoutput under splbio.

ok visa@


# 471aeecf 06-Apr-2022 naddy <naddy@openbsd.org>

constify struct cfattach


# 0d960dd8 20-Mar-2022 krw <krw@openbsd.org>

Always check if softraid0 is NULL before dereferencing it.

Avoids panic on reboot when softraid has been disabled.

Discovered by, diagnosed, first diff from & fix tested by Scott
Nicholas.

ok bluh

Always check if softraid0 is NULL before dereferencing it.

Avoids panic on reboot when softraid has been disabled.

Discovered by, diagnosed, first diff from & fix tested by Scott
Nicholas.

ok bluhm@

show more ...


# 4b1a56af 09-Jan-2022 jsg <jsg@openbsd.org>

spelling
feedback and ok tb@ jmc@ ok ratchov@


# f1993be3 12-Dec-2021 visa <visa@openbsd.org>

Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK

Add vnode parameter to VOP_STRATEGY()

Pass the device vnode as a parameter to VOP_STRATEGY() to allow calling
the correct vop_strategy callback. Now the vnode is also available
in the callback.

OK mpi@

show more ...


# 4123b6a7 16-May-2021 deraadt <deraadt@openbsd.org>

panic does not require a \n at the end. When one is provided, it looks wrong.


# 01de20b5 08-Feb-2021 stsp <stsp@openbsd.org>

Add a RAID1C (raid1 + crypto) softraid(8) discipline.

The RAID1C discipline encrypts data like the CRYPTO discipline, and accepts
multiple chunks during creation and assembly like the RAID1 discipli

Add a RAID1C (raid1 + crypto) softraid(8) discipline.

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@

show more ...


# 632f6d33 16-Dec-2020 cheloha <cheloha@openbsd.org>

softraid(4): more tsleep(9) -> tsleep_nsec(9) conversions

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 g

softraid(4): more tsleep(9) -> tsleep_nsec(9) conversions

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.

show more ...


# 47e23927 15-Oct-2020 krw <krw@openbsd.org>

Replace sr_copy_internal_data() with scsi_copy_internal_data().


# 664c6166 22-Sep-2020 krw <krw@openbsd.org>

Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'
member of 'struct scsi_xfer' has always been pointed at the 'struct scsi_generic
cmdstore' member of the same instance. So n

Since dlg@'s 2009 scsi midlayer refactoring the 'struct scsi_generic *cmd'
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@

show more ...


# 3ca8dabf 05-Sep-2020 krw <krw@openbsd.org>

Replace '32' with SID_SCSI2_ALEN (a.k.a. 31) when building emulated INQUIRY
responses. This is what the SCSI specifications say is the correct value and
already used in several cases.


# bb4b71eb 03-Sep-2020 krw <krw@openbsd.org>

Replace '.response_format = 2' with '.response_format = SID_SCSI2_RESPONSE'.


# b291b595 02-Sep-2020 krw <krw@openbsd.org>

When building emulated INQUIRY results use the SCSI_REV_* #define's to
initialize the 'version' field. Not numbers.


# eccd596d 01-Sep-2020 krw <krw@openbsd.org>

Rename [READ|WRITE]_BIG to [READ|WRITE]_10. Rename struct scsi_rw_big to
struct scsi_rw_10.

ok gnezdo@ jmatthew@ (who also did sparc64 compile test)


# e5eae15d 20-Jul-2020 krw <krw@openbsd.org>

Move remaining scsi bus initialization info from "prototype scsi link"
fields to struct scsibus_attach_args. Nuke the struct scsi_link *
(saa_sc_link) in scaibus_attach_args.

Explicitly initialize e

Move remaining scsi bus initialization info from "prototype scsi link"
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.

show more ...


# ead808c4 19-Jul-2020 krw <krw@openbsd.org>

Move the adapter related items (luns, adapter, adapter_target,
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.

Additional compile tests by jmatthew@ (sparc64) a

Move the adapter related items (luns, adapter, adapter_target,
adapter_buswidth, adapter_softc) from struct scsi_link to struct
scsibus_attach_args.

Additional compile tests by jmatthew@ (sparc64) and aoyam@ (luna88k).

show more ...


12345678910>>...18