aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ccd
Commit message (Collapse)AuthorAgeFilesLines
* GEOMification of CCD.Poul-Henning Kamp2003-06-091-1322/+0
| | | | | | | | 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
* Further devilification of CCD:Poul-Henning Kamp2003-06-021-86/+87
| | | | | | | | | | 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
* Begin deevilification of CCD:Poul-Henning Kamp2003-06-021-1/+56
| | | | | | | | | | | 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
* Remove unused variable.Poul-Henning Kamp2003-05-311-2/+0
| | | | | | | Found by: FlexeLint Notes: svn path=/head/; revision=115492
* More correct patch: Only call biofinish if we have not already sentPoul-Henning Kamp2003-04-141-1/+18
| | | | | | | any children down the mesh. Notes: svn path=/head/; revision=113464
* Call biofinish() also when we get a malloc() failure.Poul-Henning Kamp2003-04-141-4/+1
| | | | Notes: svn path=/head/; revision=113462
* Use bioq_flush() to drain a bio queue with a specific error code.Poul-Henning Kamp2003-04-011-0/+1
| | | | | | | | | | | 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
* Including <sys/stdint.h> is (almost?) universally only to be able to usePoul-Henning Kamp2003-03-181-1/+0
| | | | | | | | %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
* Centralize the devstat handling for all GEOM disk device driversPoul-Henning Kamp2003-03-081-17/+1
| | | | | | | | | | | 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
* Initialize the second buffer for mirroring to point to itself and not itsPoul-Henning Kamp2003-03-041-0/+1
| | | | | | | partner. Notes: svn path=/head/; revision=111863
* Gigacommit to improve device-driver source compatibility betweenPoul-Henning Kamp2003-03-031-13/+5
| | | | | | | | | | | | | | | | 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
* NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"Poul-Henning Kamp2003-02-211-5/+5
| | | | | | | as "this" handle. Notes: svn path=/head/; revision=111232
* NO_GEOM cleanup:Poul-Henning Kamp2003-02-211-1/+1
| | | | | | | | | | | 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
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-10/+11
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Announce our ability to do MAXPHYS transfers.Poul-Henning Kamp2003-02-111-0/+1
| | | | Notes: svn path=/head/; revision=110729
* Eliminate the sc_openmask, ccdopen() and ccdclose() functions, wePoul-Henning Kamp2003-02-011-46/+6
| | | | | | | | | | 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
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-10/+10
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Finally give CCD the disk mini-layer treatment:Poul-Henning Kamp2003-01-191-431/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Unifdef -UDEBUG on the CCD driver. The debugging is mostly uselessPoul-Henning Kamp2003-01-191-145/+0
| | | | | | | | | | | 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
* Inline now trivial functions getccdbuf() and putccdbuf().Poul-Henning Kamp2003-01-181-53/+8
| | | | | | | Fix another trivial memory-leak. Notes: svn path=/head/; revision=109486
* Fix minor memory-leak.Poul-Henning Kamp2003-01-181-0/+1
| | | | Notes: svn path=/head/; revision=109482
* Use the M_CCD malloc bucket instead of M_DEVBUF.Poul-Henning Kamp2003-01-181-41/+25
| | | | | | | Don't keep a private freelist of a low number of trivially small structures. Notes: svn path=/head/; revision=109474
* Inline trivial function ccdintr() into its one caller ccdiodone().Poul-Henning Kamp2003-01-181-21/+9
| | | | | | | Only call ccdfind() once in ccdiodone() and cache the result. Notes: svn path=/head/; revision=109473
* Sanitize the copyright section a bit: We do not need two copies of thePoul-Henning Kamp2003-01-181-51/+17
| | | | | | | four-clause BSD license in the file, one will do. Notes: svn path=/head/; revision=109471
* Find places to store the previously implicityly passed unit number inPoul-Henning Kamp2003-01-171-7/+122
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove CCDF_SWAP and CCDF_PARITY, they have never been implemented.Poul-Henning Kamp2003-01-031-21/+4
| | | | Notes: svn path=/head/; revision=108593
* Remove unused second argument from BIO_STRATEGY()Poul-Henning Kamp2003-01-031-5/+5
| | | | Notes: svn path=/head/; revision=108584
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* - Use vrefcnt() instead of v_usecount.Jeff Roberson2002-09-251-1/+1
| | | | Notes: svn path=/head/; revision=103942
* (This commit touches about 15 disk device drivers in a very consistentPoul-Henning Kamp2002-09-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix another two printf() format errors which weren't warnedMaxime Henrion2002-09-131-4/+4
| | | | | | | about because the bio_blknos were bogusly casted to long long. Notes: svn path=/head/; revision=103278
* Fix another printf() format error which wasn't warned aboutMaxime Henrion2002-09-131-2/+3
| | | | | | | because the bio_blkno was bogusly casted to an int. Notes: svn path=/head/; revision=103276
* Fix a printf() format error on 64 bits architectures.Maxime Henrion2002-09-131-3/+4
| | | | | | | Also fix some style bugs on the same line. Notes: svn path=/head/; revision=103275
* Fixed printf format errors. Most of them are 64-bit daddr_t casualties.Bruce Evans2002-05-251-4/+6
| | | | | | | | | | | | | | | 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
* Retire the bogus uses of the disklabel field d_sbsize and begin toPoul-Henning Kamp2002-05-121-2/+1
| | | | | | | | | | 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
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.Poul-Henning Kamp2002-04-081-1/+1
| | | | | | | Sponsored by: DARPA & NAI Labs Notes: svn path=/head/; revision=94182
* Retire the bogus ioctl DIOCGPART in toto.Poul-Henning Kamp2002-04-021-9/+0
| | | | | | | | | | 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
* One less user of the bogus DIOCGPART ioctl.Poul-Henning Kamp2002-04-021-12/+16
| | | | Notes: svn path=/head/; revision=93653
* Remove bogus ccddump() function in favour of the standard nodump.Poul-Henning Kamp2002-03-291-10/+1
| | | | Notes: svn path=/head/; revision=93395
* Fix bio->bio_blkno format warning.Alfred Perlstein2002-03-191-4/+4
| | | | Notes: svn path=/head/; revision=92718
* Introduce the new 64-bit size disk block, daddr64_t. ChangeKirk McKusick2002-03-151-1/+1
| | | | | | | | | | | | | | | 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
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredJohn Baldwin2002-02-271-5/+5
| | | | | | | reference. Notes: svn path=/head/; revision=91406
* Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9).Poul-Henning Kamp2001-12-301-2/+7
| | | | | | | | Submitted by: Maxim Konovalov <maxim@macomnet.ru> MFC after: 1 week Notes: svn path=/head/; revision=88707
* Return EOPNOTSUPP for unknown module events.Ian Dowse2001-11-171-1/+4
| | | | | | | | PR: kern/18473 Submitted by: "Jeroen C. van Gelderen" <gelderen@systemics.com> Notes: svn path=/head/; revision=86479
* KSE Milestone 2Julian Elischer2001-09-121-20/+20
| | | | | | | | | | | | | | | | | 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
* Fix some signed/unsigned integer confusion, and add bounds checking ofKris Kennaway2001-09-101-0/+3
| | | | | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks Notes: svn path=/head/; revision=83291
* Kill the NCCD constant by modernizing the ccd driver.Poul-Henning Kamp2001-09-041-193/+222
| | | | | | | | Submitted by: sobomax Reviewed by: phk Notes: svn path=/head/; revision=82937
* Polish error handling with biofinish().Poul-Henning Kamp2001-05-081-14/+15
| | | | Notes: svn path=/head/; revision=76366
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalPoul-Henning Kamp2001-05-061-2/+1
| | | | | | | | | than the bioerror(). Most of this patch is generated by scripts. Notes: svn path=/head/; revision=76322
* fix a number of printf format string warnings inside DEBUG ifdefsAndrew Gallatin2001-03-291-14/+15
| | | | Notes: svn path=/head/; revision=74993