summaryrefslogtreecommitdiffstats
path: root/sys/geom
Commit message (Collapse)AuthorAgeFilesLines
* Revert a bunch of contraversial changes by PHK. Afterjulian1999-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.
* Make bdev userland access work like cdev userland access unlessphk1999-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.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Initialize the dev->si_bsize fields.phk1999-08-261-1/+5
| | | | | Submitted by: tegge Reviewed by: phk
* Spring cleaning around strategy and disklabels/slices:phk1999-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.
* Use the vn_todev() function, rather than VOP_GETATTRphk1999-07-181-20/+2
|
* Fix 2nd arg to udev2dev() call in ccd.cphk1999-07-171-2/+2
|
* Initialize and hold locks for ccd generated bufs..peter1999-06-271-3/+6
| | | | Obtained from: Matt Dillon <dillon@backplane.com>
* This commit should be a extensive NO-OP:phk1999-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.
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* Continue where Julian left off in July 1998:phk1999-05-071-2/+2
| | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
* Introduce two functions: physread() and physwrite() and use these directlyphk1999-05-071-16/+2
| | | | | | in *devsw[] rather than the 46 local copies of the same functions. (grog will do the same for vinum when he has time)
* Don't use <sys/disk.h>phk1999-05-061-34/+27
|
* Fixed variable overflow problem.dg1999-03-111-5/+5
| | | | Obtained from: NetBSD via Mark J. Taylor <mtaylor@cybernet.com>
* Don't forget to remove devstat entries when takingmjacob1999-03-101-1/+6
| | | | down the CCD device.
* Set the devstat priority for ccd devices to DEVSTAT_PRIORITY_CCDken1999-02-181-2/+2
| | | | instead of DEVSTAT_PRIORITY_OTHER.
* Add a prioritization field to the devstat_add_entry() call so thatken1999-02-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | peripheral drivers can determine where in the devstat(9) list they are inserted. This requires recompilation of libdevstat, systat, vmstat, rpc.rstatd, and any ports that depend on the devstat code, since the size of the devstat structure has changed. The devstat version number has been incremented as well to reflect the change. This sorts devices in the devstat list in "more interesting" to "less interesting" order. So, for instance, da devices are now more important than floppy drives, and so will appear before floppy drives in the default output from systat, iostat, vmstat, etc. The order of devices is, for now, kept in a central table in devicestat.h. If individual drivers were able to make a meaningful decision on what priority they should be at attach time, we could consider splitting the priority information out into the various drivers. For now, though, they have no way of knowing that, so it's easier to put them in an easy to find table. Also, move the checkversion() call in vmstat(8) to a more logical place. Thanks to Bruce and David O'Brien for suggestions, for reviewing this, and for putting up with the long time it has taken me to commit it. Bruce did object somewhat to the central priority table (he would rather the priorities be distributed in each driver), so his objection is duly noted here. Reviewed by: bde, obrien
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-271-17/+17
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* Convert ccd to a proper module vs. something started by PSEUDO_SET().peter1999-01-221-14/+30
|
* Update system to new device statistics code.gibbs1998-09-151-48/+18
| | | | | Submitted by: "Kenneth D. Merry" <ken@plutotech.com> mike@smith.net.au (Mike Smith)
* Make struct buf->b_offset reflect the real byte offset which gotsos1998-08-191-1/+2
| | | | | in via the uio struct. This enables device drivers to use != DEV_BSIZE blocking on devices with wierd sector/block sizes (ie CDROM's).
* There is no such thing any more as "struct bdevsw".julian1998-07-041-8/+22
| | | | | | | | | | | | | | | | | | There is only cdevsw (which should be renamed in a later edit to deventry or something). cdevsw contains the union of what were in both bdevsw an cdevsw entries. The bdevsw[] table stiff exists and is a second pointer to the cdevsw entry of the device. it's major is in d_bmaj rather than d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw). rawread()/rawwrite() went away as part of this though it's not strictly the same patch, just that it involves all the same lines in the drivers. cdroms no longer have write() entries (they did have rawwrite (?)). tapes no longer have support for bdev operations. Reviewed by: Eivind Eklund and Mike Smith Changes suggested by eivind.
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-041-3/+3
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* This commit fixes various 64bit portability problems required fordfr1998-06-071-2/+2
| | | | | | | | | | FreeBSD/alpha. The most significant item is to change the command argument to ioctl functions from int to u_long. This change brings us inline with various other BSD versions. Driver writers may like to use (__FreeBSD_version == 300003) to detect this change. The prototype FreeBSD/alpha machdep will follow in a couple of days time.
* Slightly more correct initialisation of the new buf struct for soft-updates.julian1998-03-091-1/+3
| | | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Suggested by: Kirk McKusick
* Properly bzero() structures after they're returned from getccdbuf().jkh1998-02-221-1/+3
| | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu>
* Revert part of my previous patch - I don't see the *need*jkh1998-02-151-3/+1
| | | | to call splbio() from within an interrupt handler here. :-)
* missing spl() call and off by one error in the handling of the partitions.jkh1998-02-151-2/+3
| | | | | Submitted by: Chris Csanady <ccsanady@friley585.res.iastate.edu> Obtained from: OpenBSD
* Remove unused devfs include. (Julian or Satoshi might want to add propereivind1998-01-311-4/+1
| | | | | DEVFS support here; just including the header file doesn't do any good, and would make this depend on opt_devfs.h)
* There is no ccdread() nor ccdwrite().phk1997-11-181-3/+1
|
* Statizice.phk1997-10-241-21/+24
|
* Remove a #ifndef __FreeBSD__ chunk.phk1997-10-111-5/+1
|
* Removed unused #includes.bde1997-06-141-5/+1
|
* Make ccd use the maxsecsize sector size as denominator, thissos1997-05-011-2/+2
| | | | fixes ccd on != 512byte devices..
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make ccd compile again after the Lite2 merge.mpp1997-02-101-4/+4
| | | | VOP_UNLOCK was being called with the wrong number of arguments.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix CCD for bounced devices.dyson1997-01-101-1/+3
|
* Remove devconf, it never grew up to be of any use.phk1996-09-061-2/+1
|
* Fail when odd number of disks are specified with mirror flag. Memoryasami1996-07-241-28/+36
| | | | | | leak fixes. Miscellaneous cleanup. Partially submitted by: Matt White <mwhite+@CMU.EDU>
* Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.phk1996-07-231-14/+3
| | | | | | | | | Saves about 280 butes of source per driver, 56 bytes in object size and another 56 bytes moves from data to bss. No functional change intended nor expected. GENERIC should be about one k smaller now :-)
* Substitute raw{read|write} for ccd{read|write}phk1996-07-211-59/+2
|
* Clean up -Wunused warnings.gpalmer1996-06-121-10/+7
| | | | Reviewed by: bde
* Add #ifndef/#endif around the "#define CCD_OFFSET 16", so you can overrideasami1996-05-131-1/+3
| | | | | | it in your kernel config file. Requested (in essence) by: phk
* Leave 16 lines in front of each component partition. It's now safe toasami1996-05-131-3/+10
| | | | | | | use sd87a or sd237e even if they start at the beginning of the slice. You can also use sd85c if you prefer, although you need to change the type field in the disklabel to "4.2BSD".
* Add missing "int" to static var.asami1996-04-241-2/+2
|
* Change how mirror writes are handled, according to the discussion on theasami1996-03-261-9/+39
| | | | | | | | | | | | | | | | | | mailing list. When initiating a write, ccdbuffer() returns two "struct ccdbuf *"s linked together by the cb_mirror field. "cb_pflags & CCDPF_MIRROR_DONE" is set to 0 on both of them. When a component returns to ccdiodone(), it checks if "cb_pflags & CCDPF_MIRROR_DONE" is set or not. If not, it sets the partner's flag and returns. If it is, it means its partner has already returned, so it will go to the regular cleanup (which is in the fallthrough code). There should be no performance or functionality changes unless the higher-level scsi driver does something with the resid value. The change is purely aesthetical and prepares us for the parity implementation.
* Ported to 2.2-current. Uses [bc]devsw_add(), and is also now a properasami1996-03-211-69/+66
| | | | | | pseudo-device. Doesn't use devfs correctly yet.
* Fix one warning and fix one bug found while looking at another warning (butasami1996-01-311-1/+9
| | | | | | | | | caused by a different reason): . #ifndef __FreeBSD__ around check for negative size, FreeBSD size_t is unsigned . Disable mirror/parity if interleave size is 0 (i.e., serial concatenation).
OpenPOWER on IntegriCloud