summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
AgeCommit message (Collapse)Author
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2019-10-30Gcc -Os on landisk is not smart enough to follow the conditionalmartin
initialization and warns, unconditionaly initialize dksc at declaration with a XXX gcc comment.
2019-10-30Get &rsc->sc_dksc only when we know 'rsc' is not NULL. This was actuallymaxv
harmless because we didn't use the pointer then. Reported-by: syzbot+77097fae0e3aad6de088@syzkaller.appspotmail.com
2019-10-10fix the function pointer and callback mess:christos
- callback functions return 0 and their result is not checked; make them void. - there are two types of callbacks and they used to overload their parameters and the callback structure; separate them into "function" and "value" callbacks. - make the wait function signature consistent.
2019-09-26make nspares unsigned; it is assigned from numSpares which is unsigned.christos
2019-07-11Fix typo (s/supress/suppress/).msaitoh
2019-05-28s/recieve/receive/msaitoh
2019-03-01Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as brieflypgoyette
discussed on irc. NFCI intended. Ride the earlier kernel bump - it;s getting crowded.
2019-02-20Fix vnode locking, must lock for VOP_OPEN() and VOP_UNLOCK() when done.hannken
2019-02-10Introduce PR_ZERO to avoid open-coding memset()s everywhere. OK riastradh@.christos
2019-02-09- Change the allocation macros to be more like function callschristos
- Change sizeof(type) -> sizeof(*variable) - Use macros for the long buffer length allocations - Remove "bit polishing" memsets() -- do them only once - Remove unnecessary casts Thanks to oster@ for finding bugs and testing.
2019-02-08PR/53956: Havard Eidnes: raidframe fails to create raid set on disks.christos
The test to check if force was reversed when the code was factored out.
2019-02-07You need a star :-)christos
2019-02-06- Restore indirecting through the data pointerchristos
- Don't try to load compat code if the ioctl is not for us.
2019-02-06fix half edited line.christos
2019-02-06Fix GET_INFO. Yes, can probably be simplified.oster
2019-02-06use 'data' directly.christos
2019-02-06Fix logic inversion. Progress, but still broken.oster
2019-02-06Shuffle softc declarations to a different .h file. Create missingoster
rf_get_raid(). Things compile, but don't work correctly.
2019-02-05- Redo all the ioctl compat stuff to use a standard "ioctl" interface,christos
and provide methods to the private softc - Provide a function for constructing a RF_Raid_t from an RF_Config_t - Factor out the big inline ioctl code into functions
2019-02-05use -> instead of .christos
2019-02-05- Fix the FAIL_DISK handling (it would prolly trash the wrong disk beforechristos
since the request structs are different and the row in the old struct is the col in the new one). - Restructure the way compat modules are loaded so that we only load them for the ioctls that need them. Put a comment explaining why... - Set retcode after loading compat (now that the fail disk passthrough hack is gone), so that various ioctls don't always fail.
2019-02-05remove duplicated line in previously. noticed by paulg.mrg
2019-02-05fix the previous:mrg
rf_netbsd32 is only relevant on _LP64 as all the structures are the same for arm32 oabi/eabi compat. only do it for _LP64 *and* COMAPT_NETBSD32.
2019-02-04don't assume _LP64 == supports COMPAT_NETBSD32.mrg
this is not true for alpha, ia64 and arm32 ports, and the first two were not building because of it, and the latter would be missing the oabi support (likely not a big deal, but still wrong.) add a makefile fragment that tells you if it is supported and include it where needed to define COMPAT_NETBSD32 when building the normal kernel (ie, modules & rump.) fixes alpha build, probably fixes ia64 build. XXX: still leaves some netbsd32 code in rf_netbsdkintf.c, that should be moved into some hooks, but first the configuration setup needs to be moved into a common function the netbsd32 code can call into, vs living in the switch case itself.
2019-02-03When we force COMPAT_NETBSD32 to be defined, force it to the same valuemartin
that opt_compate_netbsd32.h would have, otherwise we get a "redefined" error from gcc. XXX this looks fishy, Paul, can you have a look, please?
2019-02-03Don't include the raidframe compat code in the main raid module, thepgoyette
compat code lives in their own compat_raid_xx modules, which will now be autoloaded if needed. While here, extract the compat_netbsd32_raid code into its own module, too. Welcome to 8.99.34
2019-01-31Prevent integer overflow: ioctl commands are u_long.christos
For consistency move prototype to the _mod.h header. XXX: Why are the compat files here? Shouldn't they be in compat/common? Or because this could be a separate module, they belong with it?
2019-01-29KNF - insert tab (thanks to mrg@)pgoyette
NFCI
2019-01-29Need to return EPASSTHROUGH for ioctls that arn't handled in compat.oster
Thanks to mlelstv for finding this!
2019-01-29Normalize all the compat hooks' names to the formpgoyette
<subsystem>_<function>_<version>_hook NFCI XXX Note that although this introduces a change in the kernel-to- XXX module interface, we are NOT bumping the kernel version number. XXX We will bump the version number once the interface stabilizes.
2019-01-28print additional debug information. make rf_containsboot() return 0bad
if bdv == NULL, to aid in the former. As discussed 1 week ago on tech-kern.
2019-01-27Merge the [pgoyette-compat] branchpgoyette
2019-01-08remove the final tsleep/wakeup pair in raidframe.mrg
2018-06-09Fix two mis-spellings in comments. No functional changes.oster
2018-04-19s/static inline/static __inline/g for consistency.christos
2018-01-23Add "bufq_fcfs" requirement to all those driver modules that explicitlypgoyette
request it in their calls to bufq_alloc().
2018-01-20fixes for the previous, noted by nakayama@.mrg
- RAIDFRAME_CONFIGURE needs to be versioned as the rows was removed, adding RAIDFRAME_CONFIGURE80, rf_config80() etc. - RAIDFRAME_CONFIGURE32 changes to match - rf_get_info80() passed the wrong source to copyout() some fixes to my original change were independantly made by nakayama@ who confirmed the changes work properly now.
2018-01-19Fix some ARM kernel builds. ARM abuses compat32 for ABI compatibility andskrll
this means some ioctls overlap.
2018-01-18implement 32-bit compat support for raidframe.mrg
convert several raidframe ioctls to be bitsize idempotent so that they work the same in 32 and 64 bit worlds, allowing netbsd32 to configure and query raid properly. remove useless 'row' in a few places. add COMPAT_80 and put the old ioctls there. raidframeio.h: RAIDFRAME_TEST_ACC - remove, unused RAIDFRAME_GET_COMPONENT_LABEL - convert to label not pointer to label RAIDFRAME_CHECK_RECON_STATUS_EXT RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT RAIDFRAME_CHECK_COPYBACK_STATUS_EXT - convert to progress info not pointer to info RAIDFRAME_GET_INFO - version entirely. raidframevar.h: - rf_recon_req{} has row, flags and raidPtr removed (they're not a useful part of this interface.) - RF_Config_s{} and RF_DeviceConfig_s{} have numRow/rows removed. - RF_RaidDisk_s{} is re-ordered slightly to fix alignment padding - the actual data was already OK. - InstallSpareTable() loses row argument rf_compat32.c has code for RF_Config_s{} in 32 bit mode, used by RAIDFRAME_CONFIGURE and RAIDFRAME_GET_INFO32. rf_compat80.c has code for rf_recon_req{}, RF_RaidDisk_s{} and RF_DeviceConfig_s{} to handle RAIDFRAME_FAIL_DISK, RAIDFRAME_GET_COMPONENT_LABEL, RAIDFRAME_CHECK_RECON_STATUS_EXT, RAIDFRAME_CHECK_PARITYREWRITE_STATUS_EXT, RAIDFRAME_CHECK_COPYBACK_STATUS_EXT, RAIDFRAME_GET_INFO. move several of the per-ioctl code blocks into separate functions. add rf_recon_req_internal{} to replace old usage of global rf_recon_req{} that had unused void * in the structure, ruining it's 32/64 bit ABI. add missing case for RAIDFRAME_GET_INFO50. adjust raid tests to use the new .conf format, and add a case to test the old method as well. raidctl: deal with lack of 'row' members in a couple of places. fail request no longer takes row. handle "START array" sections with just "numCol numSpare", ie no "numRow" specified. for now, generate old-style configuration but update raidctl.8 to specify the new style (keeping reference to the old style.) note that: RF_ComponentLabel_s::{row,num_rows} and RF_SingleComponent_s::row are obsolete but not removed yet.
2017-11-14check the result of pool_prime.christos
2017-11-09add a "booted_method" string to aid in debugging double boot matches.christos
2017-06-01remove checks for failure after memory allocation calls that cannot fail:chs
kmem_alloc() with KM_SLEEP kmem_zalloc() with KM_SLEEP percpu_alloc() pserialize_create() psref_class_create() all of these paths include an assertion that the allocation has not failed, so callers should not assert that again.
2017-04-05rf_get_component_caches(): remove useless conditionjdolecek
2017-04-05add support for DIOCGCACHE; contrary to DIOCCACHESYNC, query any non-deadjdolecek
disk in the set, even currently reconstring one
2017-01-13more faithful to the original (from coypu)christos
2017-01-13Don't consider a disk hosed if we did not find a column for it; dedup code.christos
2017-01-04PR/51776: David Binderman: Remove unused variable.christos
2017-01-04PR/51775: David Binderman: Remove unused variable.christos
2016-12-11Ensure variables are initialized. Fixes error due to -Wmaybe-unitialized.nat