summaryrefslogtreecommitdiff
path: root/sys/dev/softraid.c
AgeCommit message (Collapse)Author
2010-07-03explicitly specify flags to malloc and pool_get instead of relying on 0.Ted Unangst
This is more clear, and as thib pointed out, the default in softraid was wrong. ok thib.
2010-07-02Rename the volume specific flags variable.Joel Sing
ok marco@
2010-07-02Determine the data offset using a variable specified within the softraidJoel Sing
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@
2010-06-28Remove all adapter-specific 'struct scsi_device's. They are never used. FirstKenneth R Westerback
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
2010-06-15softraid doesnt provide disk cache settings to tweak, mark those ioctls asDavid Gwynne
not supported. this prevents a panic caused by recursively entering the ioctl handler that now happens on boot when sd tries to enable write cache on all disks. found by ckeuthe@ tested by todd@
2010-06-15dont pass the dev_t from the scsi device drivers into the midlayer forDavid Gwynne
ioctl requests, and dont pass the proc pointers around for any ioctl requests in scsi land at all. neither were used, so trim the fat. ok krw@ marco@
2010-05-21Make compile with NBIO = 0Marco Peereboom
2010-05-20New scsi code seems to be stable. Pluck previously identifiedKenneth R Westerback
low-hanging splbio/splx pairs that are no longer needed and see if this reveals any hidden scsi flaws. ok dlg@
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
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@
2010-03-28Completely overhaul optional metadata handling, allowing for multipleJoel Sing
optional metadata per volume and discipline specific optional metadata processing. ok marco@
2010-03-28Avoid potential null dereferences in ioctl paths.Joel Sing
Found by jsg@ using the clang static analyser. ok marco@
2010-03-28Replace a scsi_done() call with sr_scsi_done() which fixes a missingJoel Sing
splx() call. Found by jsg@ using the clang static analyser. ok marco@
2010-03-27Correctly initialise variable to prevent free without malloc in error path.Joel Sing
Found by clang static analyser.
2010-03-26Add an ioctl to softraid to allow the boot block and boot loader to beJoel Sing
installed on a softraid volume. This is work in progress but can continue in tree. ok marco@
2010-03-26Add storage for the boot block and boot loader to the softraid metadata.Joel Sing
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@
2010-03-23Change the scsi_cmd function member of scsi_adapter from int toKenneth R Westerback
void. Use XS_NO_CCB error in the scsi command (xs) to report the NO_CCB condition. Eliminates all SUCCESSFULLY_QUEUED and COMPLETE confusion and untangles the midlayer from the adapter a bit more. Eyes and some fixes by miod@ There may be some compile issues on little used (i.e. I don't have any) drivers but the change is mechanical and thus easy to remedy. ok dlg@
2010-02-13Force chunks into correct order once metadata is attached. This preventsJoel Sing
chunks from being reordered on an existing volume. ok marco@
2010-02-13Unbreak automatic rebuilds from hotspares.Joel Sing
ok marco@
2010-02-13Removed unused variable sml_vn.Joel Sing
ok @marco
2010-02-13Pass the number of chunks to sr_meta_attach() rather than recalculating.Joel Sing
ok marco@
2010-02-08Use character raw device to read disklabel during bootprobe, as allKenneth R Westerback
other devices do. Silences complaints about missing media on removable media devices. ok marco@ jsing@
2010-01-09Zap all setting of ITSDONE in drivers that don't look at it. NobodyKenneth R Westerback
else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
2009-12-31Add support for key disks. This allows a crypto volume to be constructedJoel Sing
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@
2009-12-15Allow auto assemble flag to be toggled for disciplines that support it.Joel Sing
"Love it!" marco@
2009-12-15Factor out discipline specific create/assemble code.Joel Sing
"in, in, in!" marco@
2009-12-15Explicitly lock the vnode when deleting a volume. This avoids a potentialJoel Sing
panic that is caused by vnode aliasing, where checkalias() switches the vnode ops for our vnode. This means that we end up using ufs unlocking rather than specfs unlocking (which is a no-op). ok marco@
2009-12-07Cleanup discipline initialisation.Joel Sing
ok marco@
2009-12-07Define discipline capabilities using a set of flags.Joel Sing
"shiny!!" marco@
2009-11-24Allow the passphrase to be changed on softraid crypto volumes. Ensure thatJoel Sing
you backup your data and lock up your pets prior to using this. Tested by todd@ ok marco@
2009-11-23Improve discipline specific ioctl framework and attach to softraid ioctl.Joel Sing
ok marco@
2009-11-22Add a framework for discipline specific ioctls.Joel Sing
ok marco@
2009-11-22Ensure that chunks are not already in use when creating a volume.Joel Sing
ok marco@
2009-11-15Fix memory leak in error case. Found by Parfait.Joel Sing
ok marco@ deraadt@
2009-10-29When probing devices at boot, compare against the full device driver nameJoel Sing
rather than the start of the device name. Also, be inclusive with devices probed rather than exclusive - this means we now only look for RAID partitions on sd(4) and wd(4) devices. prodded by deraadt@ ok marco@ deraadt@
2009-10-28Remove FWRITE from closes that aren't opened with FWRITE.Marco Peereboom
spotted and ok jsing
2009-10-13Get rid of devact enum, substitute it with an int and coresponding defines.Paul Irofti
This is needed for the addition of further suspend/resume actions. Okay deraadt@, marco@.
2009-09-21Fix use before init on wu.Marco Peereboom
Found by jsing, tested and ok jsing.
2009-09-03Check the return value of copyin().Joel Sing
ok marco@
2009-09-03Don't call VOP_CLOSE() with a null pointer, if the VOP_OPEN() call failed.Joel Sing
ok marco@
2009-08-17the null check makes more sense when it's done before derefMartynas Venckus
ok marco@, jsing@
2009-08-09Switch softraid to vnodes to prevent bad things from happening when usingMarco Peereboom
d_open/d_close. tested by many, ok jsing, thib, krw
2009-07-31Factor out code for checking if a chunk is already in use.Joel Sing
ok marco@
2009-07-23Adding disabled framework for RAID6Jordan Hargrave
ok marco@
2009-07-12Assert copyright.Joel Sing
suggested by and ok marco@
2009-07-12Fix rebuild percentage so that it ranges from 0-99% rather than 1-100%.Joel Sing
ok marco@
2009-07-12Add support for global hotspares to softraid.Joel Sing
ok marco@
2009-07-12If devices have roamed, complain once then update the metadata, just likeJoel Sing
we do for roaming volumes. ok marco@
2009-07-11Ensure that we hold the appropriate lock before callingJoel Sing
sr_ioctl_createraid(). ok marco@
2009-07-09Be sure we don't hit a NULL deref. Pointed out byMarcus Glocker
remco at d-compu dot dyndns dot org. OK marco@
2009-06-26Overhaul sr_boot_assembly(). The original code had a number of problems,Joel Sing
including a "chunk id already in use" bug that occurred when assembling more than one volume at boot. Volumes are now kept in order, as are the chunks which they are assembled from. Duplicated chunk IDs are now handled appropriately, with the chunk that has the most recent ondisk metadata being used. Also tested by nicm@ who got bitten by the "chunk id already in use" bug. ok marco@