summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_copyback.c
AgeCommit message (Collapse)Author
2011-10-14Change the vnode locking protocol of VOP_GETATTR() to request at leasthannken
a shared lock. Make all calls outside of file systems respect it. The calls from file systems need review. No objections from tech-kern.
2011-08-03Remove unused 'struct lwp *' from rf_getdisksize. No functional changes.oster
2011-05-11convert the main raidPtr mutex to a kmutex, and add a couple of cv's tomrg
cover the old sleep/wakeup points for adding_hot_spare and waitForReconCond. convert all remaining simple_lock's to kmutexes (they're not used or compiled right now... even with all options enabled) and remove the support for them. this leaves just a pair of tsleep()/wakeup() calls using old scheduling APIs.
2011-05-01convert mcpair to kmutex.mrg
2011-02-19Define accessors for number of blocks and partition size in theenami
component label and use them where appropriate. Disscussed on tech-kern.
2010-11-19Introduce struct pathbuf. This is an abstraction to hold a pathnamedholland
and the metadata required to interpret it. Callers of namei must now create a pathbuf and pass it to NDINIT (instead of a string and a uio_seg), then destroy the pathbuf after the namei session is complete. Update all namei call sites accordingly. Add a pathbuf(9) man page and update namei(9). The pathbuf interface also now appears in a couple of related additional places that were passing string/uio_seg pairs that were later fed into NDINIT. Update other call sites accordingly.
2010-11-01add support for >2TB raid devices.mrg
- add two new members to the component label: u_int numBlocksHi u_int partitionSizeHi and store the top 32 bits of the real number of blocks and partition size. modify rf_print_component_label(), rf_does_it_fit(), rf_AutoConfigureDisks() and rf_ReconstructFailedDiskBasic(). - call disk_blocksize() after disk_attach() [ from mlelstv ] - shift the block number relative to DEV_BSHIFT in raidstart() and InitBP() so that accesses work for non 512-byte devices. [ from mlelstv ] - update rf_getdisksize() to use the new getdisksize() [ from mlelstv. this part needs a separate change for netbsd-5. ] reviewed by: oster, christos and darrenr
2009-11-17Finally commit the RAIDframe parity map Summer Of Code project.jld
Drastically reduces the amount of time spent rewriting parity after an unclean shutdown by keeping better track of which regions might have had outstanding writes. Enabled by default; can be disabled on a per-set basis, or tuned, with the new raidctl(8) commands. Discussed on tech-kern@ to a general air of approval; exhortations to commit from mrg@, christos@, and others. Thanks to Google for their sponsorship, oster@ for mentoring the project, assorted developers for trying very hard to break it, and probably more I'm forgetting.
2008-01-26In a land before time, when kernel processes roamed the system, weoster
needed to keep track of the kernel process that opened a device in order to close it with the right credentials. Flash forward to today where curlwp is now quite sufficient.
2007-11-26Remove the "struct lwp *" argument from all VFS and VOP interfaces.pooka
The general trend is to remove it from all kernel interfaces and this is a start. In case the calling lwp is desired, curlwp should be used. quick consensus on tech-kern
2007-07-18Fix fallout from recent kthread changes.ad
2007-06-26Change dk_lookup() to accept an additional argument of the type enum uio_segcube
that tells whether the given path is in user space or kernel space, so it can tell NDINIT(). While the raidframe calls were ok, both ccd(4) and cgd(4) were passing pointers to user space data, which leads to strange error on i386, as reported by Jukka Salmi on current-users. The issue has been there since last august, I'm actually a bit surprised that no one in the meantime has used ccd(4) or cgd(4) on an arch where it would have simply faulted.
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-08-27- use dk_lookup instead of our home-spun version.christos
- allow raid to be configured in a wedge - allow wedges to be configured in a raid - add autoconfiguration of wedges in a raid
2006-07-21- Use the LWP cached credentials where sane.ad
- Minor cosmetic changes.
2006-05-14integrate kauth.elad
2005-12-11merge ktrace-lwp.christos
2005-02-27nuke trailing whitespaceperry
2005-02-12The 'next' argument to rf_CreateDiskQueueData is always NULL. Sinceoster
there is no particular reason to pass an extra NULL argument, turf it, and initialize p->next to NULL within the function.
2005-02-12Add a 'waitflag' argument to rf_CreateDiskQueueData() and use it tooster
determine if we are willing to wait for memory to come from the diskqueuedata (dqd) and bufpool pools. Cleanup the mess related to code calling rf_CreateDiskQueueData() with different expectations (and/or blatent disregard) of what might happen if there were insufficient pool resources.
2004-03-04Fix mcpair locking issues -- we really don't need the lock heldoster
the entire time we spend in calling rf_DiskIOEnqueue().
2003-12-30Some days you wonder if some of the function declaration consistencyoster
was just an accident in the first place. Cleanup function decls and a few comments. [ok.. so I wasn't going to fix this many.. but once you're on a roll....]
2003-12-29[Having received a definite lack of strenuous objection, a small amountoster
of strenuous agreement, and some general agreement, this commit is going ahead because it's now starting to block some other changes I wish to make.] Remove most of the support for the concept of "rows" from RAIDframe. While the "row" interface has been exported to the world, RAIDframe internals have really only supported a single row, even though they have feigned support of multiple rows. Nothing changes in configuration land -- config files still need to specify a single row, etc. All auto-config structures remain fully forward/backwards compatible. The only visible difference to the average user should be a reduction in the size of a GENERIC kernel (i386) by 4.5K. For those of us trolling through RAIDframe kernel code, a lot of the driver configuration code has become a LOT easier to read.
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.
2003-06-28Pass lwp pointers throughtout the kernel, as required, so that the lwpid candarrenr
be inserted into ktrace records. The general change has been to replace "struct proc *" with "struct lwp *" in various function prototypes, pass the lwp through and use l_proc to get the process pointer when needed. Bump the kernel rev up to 1.6V
2003-03-21Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTLdsl
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
2002-11-16Clean up error reporting, and nuke some printf verbosity.oster
2002-11-15After a rebuild-in-place, a reconstruct, or a copyback, we shouldoster
really be updating the component labels.
2002-09-17Cast the RF_DEBUG_RECON net a little wider.oster
2001-11-15don't need <sys/types.h> when including <sys/param.h>lukem
2001-11-13add RCSIDslukem
2001-10-05More #if 0's bite the dust.oster
2001-10-04Step 2 of the disentanglement. We now look to <dev/raidframe/*> foroster
the stuff that used to live in rf_types.h, rf_raidframe.h, rf_layout.h, rf_netbsd.h, rf_raid.h, rf_decluster,h, and a few other places. Believe it or not, when this is all done, things will be cleaner. No functional changes to RAIDframe.
2001-01-26Ensure we update the 'partitionSize' field of the component labelsoster
when doing a reconstruct or a copyback. If we don't, junk might be there, and that could cause the component to be not correctly autoconfigured on reboot. Thanks to Simon Burge for helping track this down.
2000-03-07Create a new rf_close_component() to handle vnode operations for closingoster
components. Teach rf_UnconfigureVnodes() how to use it, and tell the copyback and reconstruction code about it too.
2000-02-23Do a better job of (re)initializing the component labels afteroster
a reconstruct or a copyback.
2000-01-09- move a bunch of function prototypes to rf_kintf.hoster
- general cleanup of a number of prototypes that were scattered around.
2000-01-07Nuke: #include "rf_threadid.h".oster
2000-01-05- update RF_CREATE_THREAD to handle a 'process name' argument.oster
- fire up a new thread for parity re-writes, copybacks, and reconstructs. The ioctl's which trigger these actions now return immediately. - add progress accounting for the above actions. - minor rototillage of rf_netbsdkintf.c to deal with all of the above.
1999-08-14Remove a 'struct proc *'-passing abomination that's been bugging meoster
for quite some time.
1999-08-13rf_sys.h does not need to be #included in any of these files, and, actually,oster
is no longer needed at all.
1999-03-02Update for recent changes including component label support, cleanoster
bits, rebuilding components in-place, adding hot spares, shutdownhooks, etc.
1999-02-27After a vn_close(), set the vnode * to NULL so we don't try closing itoster
again later.
1999-02-27Do the VOP_UNLOCK() on an initialized vp, rather than random garbage.oster
1999-02-23Do a VOP_UNLOCK() before a vn_close().oster
1999-02-05Phase 2 of the RAIDframe cleanup. The source is now closer to KNFoster
and is much easier to read. No functionality changes.
1999-01-26RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver,oster
out-dated comments, and other unneeded stuff. This helps prepare for cleaning up the rest of the code, and adding new functionality. No functional changes to the kernel code in this commit.
1998-11-13RAIDframe, version 1.1, from the Parallel Data Laboratory atoster
Carnegie Mellon University. Full RAID implementation, including levels 0, 1, 4, 5, 6, parity logging, and a few other goodies. Ported to NetBSD by Greg Oster.