aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vn
Commit message (Collapse)AuthorAgeFilesLines
...
* Suser() simplification:Poul-Henning Kamp1999-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. Notes: svn path=/head/; revision=46112
* Submitted by: Matt Dillon <dillon@freebsd.org>Julian Elischer1999-03-141-214/+310
| | | | | | | | | | | | | | The old VN device broke in -4.x when the definition of B_PAGING changed. This patch fixes this plus implements additional capabilities. The new VN device can be backed by a file ( as per normal ), or it can be directly backed by swap. Due to dependencies in VM include files (on opt_xxx options) the new vn device cannot be a module yet. This will be fixed in a later commit. This commit delimitted by tags {PRE,POST}_MATT_VNDEV Notes: svn path=/head/; revision=44739
* The alternate B_PAGING path for vnstrategy() is used for VM faultsMatthew Dillon1999-02-011-1/+2
| | | | | | | | as well as swap I/O now. This path failed to properly set bp->b_resid on I/O completion. Notes: svn path=/head/; revision=43492
* Oops, got my #ifdef's mixed up. Fix an unused variable warning.Peter Wemm1999-01-231-1/+3
| | | | Notes: svn path=/head/; revision=43080
* Convert vn.c into a module (loadable and static).Peter Wemm1999-01-211-45/+53
| | | | Notes: svn path=/head/; revision=42985
* Remove the SLICE code.Søren Schmidt1998-09-141-325/+1
| | | | | | | | This clearly needs alot more thought, and we dont need this to hunt us down in 3.0-RELEASE. Notes: svn path=/head/; revision=39187
* Enable the vn device under DEVFS without SLICE.Søren Schmidt1998-09-121-4/+33
| | | | | | | This was apparently missed when all the #ifdef SLICE gunk was put in. Notes: svn path=/head/; revision=39104
* remove bdevsw arg from dsopen();Poul-Henning Kamp1998-08-231-2/+2
| | | | | | | | Forgotten by: julian Reviewed by: bde Notes: svn path=/head/; revision=38493
* Make struct buf->b_offset reflect the real byte offset which gotSøren Schmidt1998-08-191-1/+3
| | | | | | | | in via the uio struct. This enables device drivers to use != DEV_BSIZE blocking on devices with wierd sector/block sizes (ie CDROM's). Notes: svn path=/head/; revision=38438
* Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICEBruce Evans1998-07-301-3/+3
| | | | | | | | | | | | | | and DSO_NOLABELS flags prevent searching for slices and labels respectively. Current drivers don't set these flags. When DSO_NOLABELS is set, the in-core label for the whole disk is cloned to create an in-core label for each slice. This gives the correct result (a good in-core label for the compatibility slice) if DSO_ONESLICE is set or only one slice is found, but usually gives broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS is set. Notes: svn path=/head/; revision=37974
* SLICE probing becomes asynchronous. It can now be triggered byJulian Elischer1998-07-131-5/+2
| | | | | | | | | | | interupt level events. This needs a lot of cleanup, but has been working here for a month or two.. originally needed for CAM integration but that hasn't happenned yet. The probing state machines for each handler should be replaced by a more generic state-service. It's still quite messy in there.. Notes: svn path=/head/; revision=37616
* Fixed printf format errors.Bruce Evans1998-07-111-12/+15
| | | | Notes: svn path=/head/; revision=37555
* There is no such thing any more as "struct bdevsw".Julian Elischer1998-07-041-7/+25
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=37389
* VOP_STRATEGY grows an (struct vnode *) argumentJulian Elischer1998-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> Notes: svn path=/head/; revision=37384
* Don't use a struct buf (malloc'd) without first initialising all the fieldsJulian Elischer1998-07-041-1/+5
| | | | | | | | to some known value! (probable cause of soft updates exploding with vn devices) Notes: svn path=/head/; revision=37366
* Fix another DEVFS/SLICE ioctl.Doug Rabson1998-06-071-2/+2
| | | | Notes: svn path=/head/; revision=36740
* This commit fixes various 64bit portability problems required forDoug Rabson1998-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. Notes: svn path=/head/; revision=36735
* Add dump support to the DEVFS/slice code.Julian Elischer1998-05-061-2/+17
| | | | | | | | | now we can actually catch our crashes :-) Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere) Notes: svn path=/head/; revision=35812
* slice_device.c: permissions changes for SLICE devicesJulian Elischer1998-04-241-3/+2
| | | | | | | | | vn.c: change time of SYSINIT scheduling. wd.c don't revert to fully closed state. ( may require more) all in SLICE mode only. Notes: svn path=/head/; revision=35418
* close() is no longer a SLICE method.Julian Elischer1998-04-221-3/+5
| | | | | | | | Close is simply an open with no-read and no-write once internal to SLICE (it still exports a close to the rest of the kernel) Notes: svn path=/head/; revision=35386
* Add changes and code to implement a functional DEVFS.Julian Elischer1998-04-191-35/+314
| | | | | | | | | | | | | | | | | | | | | | | | This code will be turned on with the TWO options DEVFS and SLICE. (see LINT) Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes. /dev will be automatically mounted by init (thanks phk) on bootup. See /sys/dev/slice/slice.4 for more info. All code should act the same without these options enabled. Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others This code does not support the following: bad144 handling. Persistance. (My head is still hurting from the last time we discussed this) ATAPI flopies are not handled by the SLICE code yet. When this code is running, all major numbers are arbitrary and COULD be dynamically assigned. (this is not done, for POLA only) Minor numbers for disk slices ARE arbitray and dynamically assigned. Notes: svn path=/head/; revision=35319
* Removed unused debugging variables and macros.Bruce Evans1998-02-201-11/+3
| | | | | | | | Don't depend on "implicit int" or bloat the data section in the declaration of vn_devsw_installed. Notes: svn path=/head/; revision=33677
* Staticize.Eivind Eklund1998-02-091-3/+3
| | | | Notes: svn path=/head/; revision=33181
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.Eivind Eklund1998-01-241-1/+3
| | | | | | | | | | | This introduce an xxxFS_BOOT for each of the rootable filesystems. (Presently not required, but encouraged to allow a smooth move of option *FS to opt_dontuse.h later.) LFS is temporarily disabled, and will be re-enabled tomorrow. Notes: svn path=/head/; revision=32726
* Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that areBruce Evans1997-12-061-2/+2
| | | | | | | not handled at a particular level. Notes: svn path=/head/; revision=31578
* Merge from RELENG_2_2. Bandaid for 'lockmgr panic' on the VN device.KATO Takenori1997-10-211-5/+18
| | | | Notes: svn path=/head/; revision=30626
* Clustered read and write are switched at mount-option level.KATO Takenori1997-09-271-3/+3
| | | | | | | | | | | | | | | | | | | 1. Clustered I/O is switched by the MNT_NOCLUSTERR and MNT_NOCLUSTERW bits of the mnt_flag. The sysctl variables, vfs.foo.doclusterread and vfs.foo.doclusterwrite are deleted. Only mount option can control clustered I/O from userland. 2. When foofs_mount mounts block device, foofs_mount checks D_CLUSTERR and D_CLUSTERW bits of the d_flags member in the block device switch table. If D_NOCLUSTERR / D_NOCLUSTERW are set, MNT_NOCLUSTERR / MNT_NOCLUSTERW bits will be set. In this case, MNT_NOCLUSTERR and MNT_NOCLUSTERW cannot be cleared from userland. 3. Vnode driver disables both clustered read and write. 4. Union filesystem disables clutered write. Reviewed by: bde Notes: svn path=/head/; revision=29888
* Fixed locking violation of vnode operation. VOP_READ, VOP_WRITE andKATO Takenori1997-08-141-2/+7
| | | | | | | VOP_BMAP require locked vnode, and they will keep lock on exit. Notes: svn path=/head/; revision=28217
* Removed unused #includes.Bruce Evans1997-06-141-3/+1
| | | | Notes: svn path=/head/; revision=26640
* Add D_DISK flag to vn_bdevsw.Doug Rabson1997-04-301-2/+2
| | | | Notes: svn path=/head/; revision=25308
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includeBruce Evans1997-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. Notes: svn path=/head/; revision=24203
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.Bruce Evans1997-03-231-2/+2
| | | | | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all. Notes: svn path=/head/; revision=24131
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* This is the kernel Lite/2 commit. There are some requisite userlandJohn Dyson1997-02-101-2/+2
| | | | | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org> Notes: svn path=/head/; revision=22521
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Call bdevsw_add_generic() later so that there is no chance of returningBruce Evans1996-08-281-4/+4
| | | | | | | | | | | with an inconsistent state. I think the return actually "can't happen". Cleaned up style of recent changes. I only fiddled with this because of bugs in recent changes. Notes: svn path=/head/; revision=17864
* Some cleanups to the callout lists recently added.Julian Elischer1996-08-221-2/+2
| | | | | | | | | | | note that at_shutdown has a new parameter to indicate When during a shutdown the callout should be made. also add a RB_POWEROFF flag to reboot "howto" parameter.. tells the reboot code in our at_shutdown module to turn off the UPS and kill the power. bound to be useful eventually on laptops Notes: svn path=/head/; revision=17768
* oops apparently this wasn't in my test compile, becasue it didn'tJulian Elischer1996-08-191-3/+4
| | | | Notes: svn path=/head/; revision=17687
* Collect all the functioons concerned with rebooting into one placeJulian Elischer1996-08-191-5/+6
| | | | | | | | also add the at_shutdown callout list, and change the one user of the present (broken) method (the vn driver) to use the new scheme. Notes: svn path=/head/; revision=17677
* Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.Poul-Henning Kamp1996-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 :-) Notes: svn path=/head/; revision=17264
* Removed an unused devfs variable again.Bruce Evans1996-03-281-2/+2
| | | | | | | Added $Id$. Notes: svn path=/head/; revision=14881
* Reviewed by: julian@freebsd.orgMarc G. Fournier1996-03-281-0/+1
| | | | Notes: svn path=/head/; revision=14872
* Fixed group of disk devices (was wheel or games, now operator).Bruce Evans1996-03-271-6/+6
| | | | | | | | | | | | | | Added scsi control devices. Converted almost everything that I changed to use devfs_add_devswf() and verbose id macros. st.c: Renamed enrst* to erst* since that's what the current name is (enrst seems to be an old name). Notes: svn path=/head/; revision=14844
* Always dsgone() slices when we leave.Poul-Henning Kamp1996-03-171-3/+2
| | | | Notes: svn path=/head/; revision=14660
* First attempt at creating devfs entries for sliced devices. Doesn'tBruce Evans1996-01-271-10/+25
| | | | | | | | | | | | | | | | | | | | | | | quite work yet, so the heart of it is disabled. Added bdev and cdev args to dsopen(). drivers: Fixed device names, links, minor numbers and modes. wd.c: Started actually supporting devfs. diskslice.h: Added devfs tokens to structs (currently 576 of them per disk! :-(). subr_diskslice.c: Create devfs entries in dsopen() and (unsuccessfully) attempt to make them go away at the right times. DEVFS is #undefed at the start so that this shouldn't cause problems. Notes: svn path=/head/; revision=13647
* Fixed an overflowing multiplication in vnstrategy() by replacing it withBruce Evans1996-01-141-13/+16
| | | | | | | | | | | | the standard macro dbtob(). The non-B_PAGING case now works well enough to run newfs on a 32GB virtual drive. Fixed numerous bogus variable types and one overflowing multiplication in the B_PAGING case of vnstrategy(). Swapping to virtual drives larger than 2GB might work now. Notes: svn path=/head/; revision=13427
* Staticize.Poul-Henning Kamp1995-12-091-9/+6
| | | | Notes: svn path=/head/; revision=12700
* Julian forgot to make the *devsw structures static.Poul-Henning Kamp1995-12-081-2/+2
| | | | Notes: svn path=/head/; revision=12678
* Pass 3 of the great devsw changesJulian Elischer1995-12-081-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | most devsw referenced functions are now static, as they are in the same file as their devsw structure. I've also added DEVFS support for nearly every device in the system, however many of the devices have 'incorrect' names under DEVFS because I couldn't quickly work out the correct naming conventions. (but devfs won't be coming on line for a month or so anyhow so that doesn't matter) If you "OWN" a device which would normally have an entry in /dev then search for the devfs_add_devsw() entries and munge to make them right.. check out similar devices to see what I might have done in them in you can't see what's going on.. for a laugh compare conf.c conf.h defore and after... :) I have not doen DEVFS entries for any DISKSLICE devices yet as that will be a much more complicated job.. (pass 5 :) pass 4 will be to make the devsw tables of type (cdevsw * ) rather than (cdevsw) seems to work here.. complaints to the usual places.. :) Notes: svn path=/head/; revision=12675
* If you're going to mechanically replicate something in 50 filesJulian Elischer1995-11-291-1/+1
| | | | | | | it's best to not have a (compiles cleanly) typo in it! (sigh) Notes: svn path=/head/; revision=12521