summaryrefslogtreecommitdiff
path: root/sys/dev/ccd
AgeCommit message (Collapse)Author
2003-06-09GEOMification of CCD.Poul-Henning Kamp
You need your kernel and ccdconfig(8) to be in sync, particularly if your source tree is on a ccd device. Notes: svn path=/head/; revision=116111
2003-06-02Further devilification of CCD:Poul-Henning Kamp
Change the list interface to simplify things. Remove old list ioctls which bogusly exported the softc to userland. Move the softc and associated structures from the public header to the source file. Notes: svn path=/head/; revision=115731
2003-06-02Begin deevilification of CCD:Poul-Henning Kamp
Make CCD a GEOM class. For now only use this for implementing a OAM config method which can return a list of configured CCD devices in the format which "ccdconfig -g[v]" would normally output. Notes: svn path=/head/; revision=115729
2003-05-31Remove unused variable.Poul-Henning Kamp
Found by: FlexeLint Notes: svn path=/head/; revision=115492
2003-04-14More correct patch: Only call biofinish if we have not already sentPoul-Henning Kamp
any children down the mesh. Notes: svn path=/head/; revision=113464
2003-04-14Call biofinish() also when we get a malloc() failure.Poul-Henning Kamp
Notes: svn path=/head/; revision=113462
2003-04-01Use bioq_flush() to drain a bio queue with a specific error code.Poul-Henning Kamp
Retain the mistake of not updating the devstat API for now. Spell bioq_disksort() consistently with the remaining bioq_*(). #include <geom/geom_disk.h> where this is more appropriate. Notes: svn path=/head/; revision=112946
2003-03-18Including <sys/stdint.h> is (almost?) universally only to be able to usePoul-Henning Kamp
%j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble. Notes: svn path=/head/; revision=112367
2003-03-08Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp
in geom_disk.c. As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again. Notes: svn path=/head/; revision=111979
2003-03-04Initialize the second buffer for mirroring to point to itself and not itsPoul-Henning Kamp
partner. Notes: svn path=/head/; revision=111863
2003-03-03Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp
branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl) Notes: svn path=/head/; revision=111815
2003-02-21NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"Poul-Henning Kamp
as "this" handle. Notes: svn path=/head/; revision=111232
2003-02-21NO_GEOM cleanup:Poul-Henning Kamp
Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes. This enables drivers to ignore the (now) bogus dev_t which disk_create() returns. Notes: svn path=/head/; revision=111216
2003-02-19Back out M_* changes, per decision of the TRB.Warner Losh
Approved by: trb Notes: svn path=/head/; revision=111119
2003-02-11Announce our ability to do MAXPHYS transfers.Poul-Henning Kamp
Notes: svn path=/head/; revision=110729
2003-02-01Eliminate the sc_openmask, ccdopen() and ccdclose() functions, wePoul-Henning Kamp
can use the flag maintained by geom_disk.c Having only a strategy method to intialize, don't waste space using a cdevsw structure to do so. Notes: svn path=/head/; revision=110188
2003-01-21Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
2003-01-19Finally give CCD the disk mini-layer treatment:Poul-Henning Kamp
CAUTION: Previously CCD would be different from all other disks in the system in that there were no "ccd0" device, only a "ccd0c" device. This is no longer so after this commit. If you access a ccd device through the "/dev/ccd0c" device _and_ have not actually put a BSD disklabel on the device, you will have to use the name "/dev/ccd0". If your CCD device contains a BSD disklabel there should be no difference. You need to recompile ccdconfig(8) using the changed src/sys/sys/ccdvar.h for the -g "show me" option to work. I have run the regression test I created before I started overhauling CCD and it flags no problems, but this code is mildly evil, so take care. If you would cry if you lost what's on CCD, make a back before you upgrade. Create separate cdevsw for the /dev/ccd.ctl device. Remove the cloning function, the disk-minilayer will do all naming for us. Remove the ccdunit and ccdpart functions and carry the softc pointer in the relevant dev_t's and structures. Release all memory when a CCD device is unconfigured, previously the softc would linger behind. Remove all traces of BSD disklabel fiddling code. Remove ccdpsize, the disk mini-layer does this for us. Don't allocate memory with M_WAITOK in ccdstrategy(). Remove boundary checks which the disk mini-layer does for us. Don't allocate space for more than 2 ccdbuf, RAID was never implemented. NB: I have not tried to address any of the preexisting ailments of CCD. Notes: svn path=/head/; revision=109535
2003-01-19Unifdef -UDEBUG on the CCD driver. The debugging is mostly uselessPoul-Henning Kamp
and can be added back selectively, should anybody start to interest themselves for the internal workings of ccd. This commit will make the diffs for the following commits much more readable. Notes: svn path=/head/; revision=109534
2003-01-18Inline now trivial functions getccdbuf() and putccdbuf().Poul-Henning Kamp
Fix another trivial memory-leak. Notes: svn path=/head/; revision=109486
2003-01-18Fix minor memory-leak.Poul-Henning Kamp
Notes: svn path=/head/; revision=109482
2003-01-18Use the M_CCD malloc bucket instead of M_DEVBUF.Poul-Henning Kamp
Don't keep a private freelist of a low number of trivially small structures. Notes: svn path=/head/; revision=109474
2003-01-18Inline trivial function ccdintr() into its one caller ccdiodone().Poul-Henning Kamp
Only call ccdfind() once in ccdiodone() and cache the result. Notes: svn path=/head/; revision=109473
2003-01-18Sanitize the copyright section a bit: We do not need two copies of thePoul-Henning Kamp
four-clause BSD license in the file, one will do. Notes: svn path=/head/; revision=109471
2003-01-17Find places to store the previously implicityly passed unit number inPoul-Henning Kamp
the three configuration ioctls which need a unit number. Add a "ccd.ctl" device for config operations. Implement ioctls on ccd.ctl which rely on the explicityly passed unit numbers. Update ccdconfig to use the new ccd.ctl interface. Add code to the kernel to detect old ccdconfig binaries, and whine about it. Add code to ccdconfig to detect old kernels, and whine about it. These two compatibility measures will be retained only for a limited period since they are in the way of GEOM'ification of ccd. Notes: svn path=/head/; revision=109421
2003-01-03Remove CCDF_SWAP and CCDF_PARITY, they have never been implemented.Poul-Henning Kamp
Notes: svn path=/head/; revision=108593
2003-01-03Remove unused second argument from BIO_STRATEGY()Poul-Henning Kamp
Notes: svn path=/head/; revision=108584
2002-12-30Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt
Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
2002-09-25 - Use vrefcnt() instead of v_usecount.Jeff Roberson
Notes: svn path=/head/; revision=103942
2002-09-20(This commit touches about 15 disk device drivers in a very consistentPoul-Henning Kamp
and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.) If struct disklabel is the messenger: kill the messenger. Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead. Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels. Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them. The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it. This concludes (modulus any mistakes) the series of disklabel related commits. I belive it all amounts to a NOP for all the rest of you :-) Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103714
2002-09-13Fix another two printf() format errors which weren't warnedMaxime Henrion
about because the bio_blknos were bogusly casted to long long. Notes: svn path=/head/; revision=103278
2002-09-13Fix another printf() format error which wasn't warned aboutMaxime Henrion
because the bio_blkno was bogusly casted to an int. Notes: svn path=/head/; revision=103276
2002-09-13Fix a printf() format error on 64 bits architectures.Maxime Henrion
Also fix some style bugs on the same line. Notes: svn path=/head/; revision=103275
2002-05-25Fixed printf format errors. Most of them are 64-bit daddr_t casualties.Bruce Evans
Printing daddr_t's using %d format was always an error, but gcc's warning about it was ignored for supported 64-bit arches and not printed for supported 32-bit arches. Hundreds if not thousands thousands of previously "fixed" daddr_t printings are now broken on 32-bit machines by casting daddr_t's to longs. daddr_t's should be printed using %jd format, but this fix uses %lld since %j is not implemented in the kernel yet. Fixed some nearby format printf errors (style bugs). Notes: svn path=/head/; revision=97272
2002-05-12Retire the bogus uses of the disklabel field d_sbsize and begin toPoul-Henning Kamp
initialize it to zero so we don't have to have everbody and their aunt including FFS specific header files. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=96475
2002-04-08Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.Poul-Henning Kamp
Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=94182
2002-04-02Retire the bogus ioctl DIOCGPART in toto.Poul-Henning Kamp
Once again we can notice that badly thought out hacks ferment and infect far more code than initially expected. Sponsored by: DARPA and NAI Labs. Notes: svn path=/head/; revision=93657
2002-04-02One less user of the bogus DIOCGPART ioctl.Poul-Henning Kamp
Notes: svn path=/head/; revision=93653
2002-03-29Remove bogus ccddump() function in favour of the standard nodump.Poul-Henning Kamp
Notes: svn path=/head/; revision=93395
2002-03-19Fix bio->bio_blkno format warning.Alfred Perlstein
Notes: svn path=/head/; revision=92718
2002-03-15Introduce the new 64-bit size disk block, daddr64_t. ChangeKirk McKusick
the bio and buffer structures to have daddr64_t bio_pblkno, b_blkno, and b_lblkno fields which allows access to disks larger than a Terabyte in size. This change also requires that the VOP_BMAP vnode operation accept and return daddr64_t blocks. This delta should not affect system operation in any way. It merely sets up the necessary interfaces to allow the development of disk drivers that work with these larger disk block addresses. It also allows for the development of UFS2 which will use 64-bit block addresses. Notes: svn path=/head/; revision=92363
2002-02-27Simple p_ucred -> td_ucred changes to start using the per-thread ucredJohn Baldwin
reference. Notes: svn path=/head/; revision=91406
2001-12-30Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9).Poul-Henning Kamp
Submitted by: Maxim Konovalov <maxim@macomnet.ru> MFC after: 1 week Notes: svn path=/head/; revision=88707
2001-11-17Return EOPNOTSUPP for unknown module events.Ian Dowse
PR: kern/18473 Submitted by: "Jeroen C. van Gelderen" <gelderen@systemics.com> Notes: svn path=/head/; revision=86479
2001-09-12KSE Milestone 2Julian Elischer
Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
2001-09-10Fix some signed/unsigned integer confusion, and add bounds checking ofKris Kennaway
arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks Notes: svn path=/head/; revision=83291
2001-09-04Kill the NCCD constant by modernizing the ccd driver.Poul-Henning Kamp
Submitted by: sobomax Reviewed by: phk Notes: svn path=/head/; revision=82937
2001-05-08Polish error handling with biofinish().Poul-Henning Kamp
Notes: svn path=/head/; revision=76366
2001-05-06Actually biofinish(struct bio *, struct devstat *, int error) is more generalPoul-Henning Kamp
than the bioerror(). Most of this patch is generated by scripts. Notes: svn path=/head/; revision=76322
2001-03-29fix a number of printf format string warnings inside DEBUG ifdefsAndrew Gallatin
Notes: svn path=/head/; revision=74993