aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* 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-194/+223
| | | | | | | | 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
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-261-2/+0
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* Fix a braino in ccd's clone routine.Poul-Henning Kamp2001-01-291-1/+1
| | | | | | | Submitted by: tegge Notes: svn path=/head/; revision=71773
* Back out proc locking to protect p_ucred for obtaining additionalJohn Baldwin2001-01-271-34/+6
| | | | | | | references along with the actual obtaining of additional references. Notes: svn path=/head/; revision=71699
* Proc locking in the form of using the proc lock to protect p_ucred whileJohn Baldwin2001-01-231-6/+34
| | | | | | | we obtain another reference to it for vnode operations. Notes: svn path=/head/; revision=71463
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+2
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Avoid the modules madness I inadvertently introduced by making thePoul-Henning Kamp2000-09-021-12/+2
| | | | | | | | | | | | | | | | | | | | | cloning infrastructure standard in kern_conf. Modules are now the same with or without devfs support. If you need to detect if devfs is present, in modules or elsewhere, check the integer variable "devfs_present". This happily removes an ugly hack from kern/vfs_conf.c. This forces a rename of the eventhandler and the standard clone helper function. Include <sys/eventhandler.h> in <sys/conf.h>: it's a helper #include like <sys/queue.h> Remove all #includes of opt_devfs.h they no longer matter. Notes: svn path=/head/; revision=65374
* Give ccd a cloning function.Poul-Henning Kamp2000-08-291-8/+32
| | | | Notes: svn path=/head/; revision=65208
* Move the truncation code out of vn_open and into the open system callKirk McKusick2000-07-041-2/+3
| | | | | | | | | | | | | after the acquisition of any advisory locks. This fix corrects a case in which a process tries to open a file with a non-blocking exclusive lock. Even if it fails to get the lock it would still truncate the file even though its open failed. With this change, the truncation is done only after the lock is successfully acquired. Obtained from: BSD/OS Notes: svn path=/head/; revision=62550
* Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp2000-05-051-1/+1
| | | | | | | | | | | | | | | | | | <sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter Notes: svn path=/head/; revision=60041
* Convert to struct bio instead of struct buf.Poul-Henning Kamp2000-05-011-90/+75
| | | | Notes: svn path=/head/; revision=59841
* Remove unneeded #include <vm/vm_zone.h>Poul-Henning Kamp2000-04-301-1/+0
| | | | | | | Generated by: src/tools/tools/kerninclude Notes: svn path=/head/; revision=59794
* Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp2000-04-151-5/+6
| | | | | | | | | | | | | Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS Notes: svn path=/head/; revision=59249
* Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp2000-04-021-6/+7
| | | | | | | | | | | | | | | | (Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde. Notes: svn path=/head/; revision=58934
* Rename the existing BUF_STRATEGY() to DEV_STRATEGY()Poul-Henning Kamp2000-03-201-11/+5
| | | | | | | | | | | substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts. Notes: svn path=/head/; revision=58349
* Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp2000-03-201-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful. Notes: svn path=/head/; revision=58345
* Remove #if NCCD > 0 - it's guaranteed to be true by config if ccd.c isPeter Wemm2000-01-291-2/+0
| | | | | | | being compiled. (NCCD is used elsewhere though :-( ) Notes: svn path=/head/; revision=56825
* Cleanup some remaining bdev fluff.Poul-Henning Kamp2000-01-161-35/+6
| | | | Notes: svn path=/head/; revision=56098
* Give vn_isdisk() a second argument where it can return a suitable errno.Poul-Henning Kamp2000-01-101-3/+1
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=55756
* Remove unused variableEivind Eklund1999-12-211-1/+0
| | | | Notes: svn path=/head/; revision=54934
* Introduce NDFREE (and remove VOP_ABORTOP)Eivind Eklund1999-12-151-6/+13
| | | | Notes: svn path=/head/; revision=54655
* Revamp the devstat priority system. All disks now have the same priority.Kenneth D. Merry1999-12-081-2/+2
| | | | | | | | | | | | | | | | | | | | | The same goes for CD drivers and tape drivers. In systems with mixed IDE and SCSI, devices in the same priority class will be sorted in attach order. Also, the 'CCD' priority is now the 'ARRAY' priority, and a number of drivers have been modified to use that priority. This includes the necessary changes to all drivers, except the ATA drivers. Soren will modify those separately. This does not include and does not require any change in the devstat version number, since no known userland applications use the priority enumerations. Reviewed by: msmith, sos, phk, jlemon, mjacob, bde Notes: svn path=/head/; revision=54279
* Convert various pieces of code to use vn_isdisk() rather than checkingPoul-Henning Kamp1999-11-221-12/+1
| | | | | | | | | | | for vp->v_type == VBLK. In ccd: we don't need to call VOP_GETATTR to find the type of a vnode. Reviewed by: sos Notes: svn path=/head/; revision=53577
* Remove the devsw magic from DEV_MODULE()Poul-Henning Kamp1999-11-071-1/+2
| | | | Notes: svn path=/head/; revision=52965
* Removal of sys/device.hNick Hibma1999-10-051-1/+0
| | | | | | | | | | | | | | | | - Move intrhook stuff into kernel.h - Remove all occurrences of #device <device.h> - Add kernel.h were necessary (nowhere) - delete device.h This file contained the structures for cfdata (old style config) and is no longer used. It was included by most drivers. It confuses the remote debugger as the definition of 'struct device' in device.h is found before the one in bus_private.h. Notes: svn path=/head/; revision=51957
* Correct typo in comment. putccdbuf() releases a buffer, it doesn't allocate ↵Greg Lehey1999-09-271-1/+1
| | | | | | | one. Notes: svn path=/head/; revision=51714
* Buffer locking code failed to use BUF_KERNPROC and BUF_UNLOCK andMatthew Dillon1999-09-271-1/+34
| | | | | | | | | | | | BUF_LOCKFREE a buffer prior to physically freeing it. While these bugs did not cause a crash, they might in the future. Added eof handling for unlabeled partitions. Submitted by: Tor.Egge@fast.no Notes: svn path=/head/; revision=51701
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-251-5/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* Cleanup CCD quite a bit, including adding clarifying comments.Matthew Dillon1999-09-231-147/+357
| | | | | | | | | | | | | | | | | | Enhance MIRROR code. Add a few more sanity checks and implement a zone-based disk selector to make use of both disks when reading. Also implement a read fail-over. If a read error occurs on one disk, the I/O is retried on the other. NOTE: CCD's mirroring support cannot deal with write errors properly in regards to recovery, meaning that 'old' data under a write error may be read non-deterministically if you reboot after a write error, and CCD certainly cannot deal with a disk changeout. And it still can't. Use vinum if you are really serious about mirroring. CCD basically just implements a poor-man's mirror. Notes: svn path=/head/; revision=51601
* Fix ccdiodone code. The code was using cbp->cb_buf.b_bcount toMatthew Dillon1999-09-231-1/+10
| | | | | | | | | sum the total amount of I/O issued to determine when all the I/O has completed. This fails when the EOF boundry occurs in the middle of an I/O. Using cbp->cb_buf.b_bufsize works better. Notes: svn path=/head/; revision=51600
* Fix bug in pseudo-geometry calculation code that assumed a sector sizeMatthew Dillon1999-09-231-1/+1
| | | | | | | smaller then 1024 bytes. Notes: svn path=/head/; revision=51580
* Use devstat_end_transaction_buf() rather than Use devstat_end_transaction()Poul-Henning Kamp1999-09-181-8/+1
| | | | Notes: svn path=/head/; revision=51376
* Changes to centralise the default blocksize behaviour.Julian Elischer1999-09-091-4/+0
| | | | | | | | | More likely to follow. Submitted by: phk@freebsd.org Notes: svn path=/head/; revision=51111
* Revert a bunch of contraversial changes by PHK. AfterJulian Elischer1999-09-031-0/+1
| | | | | | | | | | | | | a quick think and discussion among various people some form of some of these changes will probably be recommitted. The reversion requested was requested by dg while discussions proceed. PHK has indicated that he can live with this, and it has been agreed that some form of some of these changes may return shortly after further discussion. Notes: svn path=/head/; revision=50830
* Make bdev userland access work like cdev userland access unlessPoul-Henning Kamp1999-08-301-1/+0
| | | | | | | | | | | | | the highly non-recommended option ALLOW_BDEV_ACCESS is used. (bdev access is evil because you don't get write errors reported.) Kill si_bsize_best before it kills Matt :-) Use the specfs routines rather having cloned copies in devfs. Notes: svn path=/head/; revision=50623
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Initialize the dev->si_bsize fields.Poul-Henning Kamp1999-08-261-1/+5
| | | | | | | | Submitted by: tegge Reviewed by: phk Notes: svn path=/head/; revision=50403
* Spring cleaning around strategy and disklabels/slices:Poul-Henning Kamp1999-08-141-4/+4
| | | | | | | | | | | | | | | | | Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code. Notes: svn path=/head/; revision=49771
* Use the vn_todev() function, rather than VOP_GETATTRPoul-Henning Kamp1999-07-181-20/+2
| | | | Notes: svn path=/head/; revision=48885
* Fix 2nd arg to udev2dev() call in ccd.cPoul-Henning Kamp1999-07-171-2/+2
| | | | Notes: svn path=/head/; revision=48865
* Initialize and hold locks for ccd generated bufs..Peter Wemm1999-06-271-3/+6
| | | | | | | Obtained from: Matt Dillon <dillon@backplane.com> Notes: svn path=/head/; revision=48268
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-301-6/+21
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625