summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
AgeCommit message (Collapse)Author
2022-08-03Pull up following revision(s) (requested by riastradh in ticket #1485):martin
sys/dev/pci/if_iwi.c: revision 1.117 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.401 sys/dev/scsipi/ses.c: revision 1.52 sys/dev/isa/mcd.c: revision 1.121 sys/dev: Memset zero before copyout. Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry. I think the iwi(4), mcd(4), and ses(4) changes actually plug leaks; the raidframe(4) change probably doesn't (but doesn't hurt).
2021-12-19Pull up following revision(s) (requested by mrg in ticket #1394):martin
sys/dev/raidframe/rf_diskqueue.c: revision 1.63 (patch) call buf_destroy() after buf_init(). hopefully fixes the lockdebug problem shown here: http://mail-index.netbsd.org/tech-kern/2021/12/10/msg027851.html but seems unlikely to fix the original problem. tested on i386/anita. ok oster@ XXX: pullup-9 (netbsd-8 uses old APIs.)
2021-10-19Pull up following revision(s) (requested by oster in ticket #1361):martin
sys/dev/raidframe/rf_netbsd.h: revision 1.36 (via patch) sys/dev/raidframe/rf_diskqueue.c: revision 1.58 sys/dev/raidframe/rf_diskqueue.c: revision 1.59 remove unnnecessary splbio() in rf_FreeDiskQueueData() getiobuf() can return NULL if there are no IO buffers available. RAIDframe can't deal with that, so create a dedicated pool of buffers to use for IO. PR_WAITOK is fine here, as we pre-allocate more than we need to guarantee IO can make progress. Tuning of pool still to come.
2021-02-17Pull up following revision(s) (requested by oster in ticket #1206):martin
sys/dev/raidframe/rf_reconstruct.c: revision 1.125 Fix a long long-standing off-by-one error in computing lastPSID. SUsPerPU is only really supported for a value of 1, and since the first PSID is 0, the last will be numStripe-1. Also update the setting of pending_writes to reflect the change to lastPSID. Needs pullups to -8 and -9.
2020-03-21Pull up following revision(s) (requested by riastradh in ticket #795):martin
sys/dev/dksubr.c: revision 1.112 sys/arch/xen/xen/xbd_xenbus.c: revision 1.95 sys/dev/scsipi/sd.c: revision 1.328 sys/dev/dkvar.h: revision 1.32 sys/dev/ld.c: revision 1.109 sys/dev/cgd.c: revision 1.120 sys/dev/raidframe/rf_netbsdkintf.c: revision 1.380 sys/dev/ata/wd.c: revision 1.458 Add a flag to dk_dump for virtual disk devices. If a disk is backed by a physical medium other than itself, such as cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion detection for dk_dump. If, however, a device represents a physical medium on its own, such as wd(4), then it passes 0 instead. With this, I can now dump to dk on cgd on dk on wd.
2019-12-18Pull up following revision(s) (requested by tsutsui in ticket #570):martin
sys/compat/netbsd32/netbsd32_compat_50_sysv.c: revision 1.3 sys/dev/raidframe/rf_compat50.h: revision 1.6 sys/arch/emips/emips/bus_space.c: revision 1.3 sys/compat/net/if.h: revision 1.5 sys/arch/emips/stand/common/bootinfo.c: revision 1.2 sys/compat/common/sysv_msg_50.c: revision 1.5 sys/compat/common/kern_time_30.c: revision 1.8 sys/arch/emips/stand/common/bootinfo.h: revision 1.2 sys/arch/ia64/include/bus.h: revision 1.4 sys/arch/ia64/ia64/bus_space.c: revision 1.2 sys/compat/common/sysv_shm_50.c: revision 1.5 sys/dev/ic/adw.h: revision 1.15 sys/compat/common/uipc_syscalls_50.c: revision 1.10 sys/arch/emips/ebus/flash_ebus.c: revision 1.22 sys/dev/ic/adv.h: revision 1.15 sys/dev/ic/adwmcode.c: revision 1.18 sys/dev/ic/advlib.c: revision 1.29 sys/arch/hpcarm/include/kloader.h: revision 1.3 sys/dev/usb/uberry.c: revision 1.16 sys/compat/common/sysv_sem_50.c: revision 1.5 sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.43 sys/dev/ic/advlib.h: revision 1.21 sys/dev/ic/adv.c: revision 1.50 sys/compat/netinet6/in6_var.h: revision 1.5 sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm: revision 1.2 sys/arch/emips/include/loadfile_machdep.h: revision 1.3 sys/arch/emips/stand/common/prom_iface.c: revision 1.7 sys/dev/ic/adw.c: revision 1.56 sys/dev/ic/adwmcode.h: revision 1.12 sys/dev/ic/advmcode.c: revision 1.10 sys/arch/emips/ebus/ace_ebus.c: revision 1.22 sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.5 sys/dev/raidframe/rf_compat50.c: revision 1.13 sys/arch/x68k/dev/intiovar.h: revision 1.15 sys/dev/usb/uipad.c: revision 1.8 sys/arch/zaurus/include/kloader.h: revision 1.3 sys/arch/emips/stand/common/bootxx.c: revision 1.2 sys/dev/ic/adwlib.h: revision 1.23 sys/dev/ic/adwlib.c: revision 1.44 sys/compat/netbsd32/netbsd32_compat_16.c: revision 1.3 sys/arch/amigappc/include/intr.h: revision 1.27 sys/arch/x68k/dev/mfp.c: revision 1.27 sys/arch/arm/at91/at91dbgu.c: revision 1.17 sys/dev/ic/advmcode.h: revision 1.7 sys/compat/ultrix/ultrix_exec.h: revision 1.7 sys/compat/common/vfs_syscalls_50.c: revision 1.24 sys/arch/mips/cavium/octeon_dma.c: revision 1.3 sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm: revision 1.2 Remove clause 3 and 4 from TNF licenses. Ok'ed by martin@ in PR/54760. Remove clause 3 and 4 leftovers from TNF licenses in more sources. Confirmed by martin@ in PR/54760.
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