summaryrefslogtreecommitdiffstats
path: root/sys/dev/ccd
Commit message (Collapse)AuthorAgeFilesLines
* GEOMification of CCD.phk2003-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.
* Further devilification of CCD:phk2003-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.
* Begin deevilification of CCD:phk2003-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.
* Remove unused variable.phk2003-05-311-2/+0
| | | | Found by: FlexeLint
* More correct patch: Only call biofinish if we have not already sentphk2003-04-141-1/+18
| | | | any children down the mesh.
* Call biofinish() also when we get a malloc() failure.phk2003-04-141-4/+1
|
* Use bioq_flush() to drain a bio queue with a specific error code.phk2003-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.
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-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.
* Centralize the devstat handling for all GEOM disk device driversphk2003-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.
* Initialize the second buffer for mirroring to point to itself and not itsphk2003-03-041-0/+1
| | | | partner.
* Gigacommit to improve device-driver source compatibility betweenphk2003-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)
* NO_GEOM cleanup: Convert CCD(4) to be use "struct disk*" instead of "dev_t"phk2003-02-211-5/+5
| | | | as "this" handle.
* NO_GEOM cleanup:phk2003-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.
* Back out M_* changes, per decision of the TRB.imp2003-02-191-10/+11
| | | | Approved by: trb
* Announce our ability to do MAXPHYS transfers.phk2003-02-111-0/+1
|
* Eliminate the sc_openmask, ccdopen() and ccdclose() functions, wephk2003-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.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-10/+10
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Finally give CCD the disk mini-layer treatment:phk2003-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.
* Unifdef -UDEBUG on the CCD driver. The debugging is mostly uselessphk2003-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.
* Inline now trivial functions getccdbuf() and putccdbuf().phk2003-01-181-53/+8
| | | | Fix another trivial memory-leak.
* Fix minor memory-leak.phk2003-01-181-0/+1
|
* Use the M_CCD malloc bucket instead of M_DEVBUF.phk2003-01-181-41/+25
| | | | Don't keep a private freelist of a low number of trivially small structures.
* Inline trivial function ccdintr() into its one caller ccdiodone().phk2003-01-181-21/+9
| | | | Only call ccdfind() once in ccdiodone() and cache the result.
* Sanitize the copyright section a bit: We do not need two copies of thephk2003-01-181-51/+17
| | | | four-clause BSD license in the file, one will do.
* Find places to store the previously implicityly passed unit number inphk2003-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.
* Remove CCDF_SWAP and CCDF_PARITY, they have never been implemented.phk2003-01-031-21/+4
|
* Remove unused second argument from BIO_STRATEGY()phk2003-01-031-5/+5
|
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* - Use vrefcnt() instead of v_usecount.jeff2002-09-251-1/+1
|
* (This commit touches about 15 disk device drivers in a very consistentphk2002-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.
* Fix another two printf() format errors which weren't warnedmux2002-09-131-4/+4
| | | | about because the bio_blknos were bogusly casted to long long.
* Fix another printf() format error which wasn't warned aboutmux2002-09-131-2/+3
| | | | because the bio_blkno was bogusly casted to an int.
* Fix a printf() format error on 64 bits architectures.mux2002-09-131-3/+4
| | | | Also fix some style bugs on the same line.
* Fixed printf format errors. Most of them are 64-bit daddr_t casualties.bde2002-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).
* Retire the bogus uses of the disklabel field d_sbsize and begin tophk2002-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.
* Move generic disk ioctls from <sys/disklabel.h> to <sys/disk.h>.phk2002-04-081-1/+1
| | | | Sponsored by: DARPA & NAI Labs
* Retire the bogus ioctl DIOCGPART in toto.phk2002-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.
* One less user of the bogus DIOCGPART ioctl.phk2002-04-021-12/+16
|
* Remove bogus ccddump() function in favour of the standard nodump.phk2002-03-291-10/+1
|
* Fix bio->bio_blkno format warning.alfred2002-03-191-4/+4
|
* Introduce the new 64-bit size disk block, daddr64_t. Changemckusick2002-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.
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-271-5/+5
| | | | reference.
* Reduce kernel stack usage of ccdinit() by MAXPATHLEN by using MALLOC(9).phk2001-12-301-2/+7
| | | | | Submitted by: Maxim Konovalov <maxim@macomnet.ru> MFC after: 1 week
* Return EOPNOTSUPP for unknown module events.iedowse2001-11-171-1/+4
| | | | | PR: kern/18473 Submitted by: "Jeroen C. van Gelderen" <gelderen@systemics.com>
* KSE Milestone 2julian2001-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
* Fix some signed/unsigned integer confusion, and add bounds checking ofkris2001-09-101-0/+3
| | | | | | | | arguments to some functions. Obtained from: NetBSD Reviewed by: peter MFC after: 2 weeks
* Kill the NCCD constant by modernizing the ccd driver.phk2001-09-041-194/+223
| | | | | Submitted by: sobomax Reviewed by: phk
* Polish error handling with biofinish().phk2001-05-081-14/+15
|
* Actually biofinish(struct bio *, struct devstat *, int error) is more generalphk2001-05-061-2/+1
| | | | | | than the bioerror(). Most of this patch is generated by scripts.
* fix a number of printf format string warnings inside DEBUG ifdefsgallatin2001-03-291-14/+15
|
OpenPOWER on IntegriCloud