summaryrefslogtreecommitdiffstats
path: root/sys/dev/vn
Commit message (Collapse)AuthorAgeFilesLines
* Remove the SLICE code.sos1998-09-141-325/+1
| | | | | This clearly needs alot more thought, and we dont need this to hunt us down in 3.0-RELEASE.
* Enable the vn device under DEVFS without SLICE.sos1998-09-121-4/+33
| | | | This was apparently missed when all the #ifdef SLICE gunk was put in.
* remove bdevsw arg from dsopen();phk1998-08-231-2/+2
| | | | | Forgotten by: julian Reviewed by: bde
* Make struct buf->b_offset reflect the real byte offset which gotsos1998-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).
* Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICEbde1998-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.
* SLICE probing becomes asynchronous. It can now be triggered byjulian1998-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..
* Fixed printf format errors.bde1998-07-111-12/+15
|
* There is no such thing any more as "struct bdevsw".julian1998-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.
* 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>
* Don't use a struct buf (malloc'd) without first initialising all the fieldsjulian1998-07-041-1/+5
| | | | | to some known value! (probable cause of soft updates exploding with vn devices)
* Fix another DEVFS/SLICE ioctl.dfr1998-06-071-2/+2
|
* 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.
* Add dump support to the DEVFS/slice code.julian1998-05-061-2/+17
| | | | | | now we can actually catch our crashes :-) Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere)
* slice_device.c: permissions changes for SLICE devicesjulian1998-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.
* close() is no longer a SLICE method.julian1998-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)
* Add changes and code to implement a functional DEVFS.julian1998-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.
* Removed unused debugging variables and macros.bde1998-02-201-11/+3
| | | | | Don't depend on "implicit int" or bloat the data section in the declaration of vn_devsw_installed.
* Staticize.eivind1998-02-091-3/+3
|
* Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.eivind1998-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.
* Use ENOIOCTL instead of -1 (= ERESTART) for diskslice ioctls that arebde1997-12-061-2/+2
| | | | not handled at a particular level.
* Merge from RELENG_2_2. Bandaid for 'lockmgr panic' on the VN device.kato1997-10-211-5/+18
|
* Clustered read and write are switched at mount-option level.kato1997-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
* Fixed locking violation of vnode operation. VOP_READ, VOP_WRITE andkato1997-08-141-2/+7
| | | | VOP_BMAP require locked vnode, and they will keep lock on exit.
* Removed unused #includes.bde1997-06-141-3/+1
|
* Add D_DISK flag to vn_bdevsw.dfr1997-04-301-2/+2
|
* 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.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-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.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-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>
* 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.
* Call bdevsw_add_generic() later so that there is no chance of returningbde1996-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.
* Some cleanups to the callout lists recently added.julian1996-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
* oops apparently this wasn't in my test compile, becasue it didn'tjulian1996-08-191-3/+4
|
* Collect all the functioons concerned with rebooting into one placejulian1996-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.
* 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 :-)
* Removed an unused devfs variable again.bde1996-03-281-2/+2
| | | | Added $Id$.
* Reviewed by: julian@freebsd.orgscrappy1996-03-281-0/+1
|
* Fixed group of disk devices (was wheel or games, now operator).bde1996-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).
* Always dsgone() slices when we leave.phk1996-03-171-3/+2
|
* First attempt at creating devfs entries for sliced devices. Doesn'tbde1996-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.
* Fixed an overflowing multiplication in vnstrategy() by replacing it withbde1996-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.
* Staticize.phk1995-12-091-9/+6
|
* Julian forgot to make the *devsw structures static.phk1995-12-081-2/+2
|
* Pass 3 of the great devsw changesjulian1995-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.. :)
* If you're going to mechanically replicate something in 50 filesjulian1995-11-291-1/+1
| | | | it's best to not have a (compiles cleanly) typo in it! (sigh)
* OK, that's it..julian1995-11-291-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | That's EVERY SINGLE driver that has an entry in conf.c.. my next trick will be to define cdevsw[] and bdevsw[] as empty arrays and remove all those DAMNED defines as well.. Each of these drivers has a SYSINIT linker set entry that comes in very early.. and asks teh driver to add it's own entry to the two devsw[] tables. some slight reworking of the commits from yesterday (added the SYSINIT stuff and some usually wrong but token DEVFS entries to all these devices. BTW does anyone know where the 'ata' entries in conf.c actually reside? seems we don't actually have a 'ataopen() etc... If you want to add a new device in conf.c please make sure I know so I can keep it up to date too.. as before, this is all dependent on #if defined(JREMOD) (and #ifdef DEVFS in parts)
* Fix a printf.phk1995-11-201-1/+1
|
* Kill setting of b_pfcent - it's unused.dg1995-11-191-1/+0
|
* Moved prototypes for devswitch functions from conf.c and driver sourcesbde1995-11-041-6/+0
| | | | | | | to <machine/conf.h>. conf.h was mechanically generated by `grep ^d_ conf.c >conf.h'. This accounts for part of its ugliness. The prototypes should be moved back to the driver sources when the functions are staticalized.
* Fix benign type mismatches in devsw functions. 82 out of 299 devswbde1995-09-081-4/+4
| | | | functions were wrong.
OpenPOWER on IntegriCloud