Commit Graph

53 Commits

Author SHA1 Message Date
enami
d6eb3246bf Fix a typo in panic string. 1997-12-31 02:46:51 +00:00
enami
e4aca18342 When building fake disklabel, if a partition type is other than FS_UNUSED
don't override it so that port specific hack takes effect.
1997-12-31 02:38:24 +00:00
pk
1743d97bd7 Pull over fixes from vm_swap.c:
- guard against synchronous I/O completion
	- avoid race conditions
	- use bgetvp/brelvp to properly maintain the vnode holdcount
	  and clean/dirty buffer lists.
1997-12-02 13:54:48 +00:00
fvdl
9e76627586 Do hack around VOP_BMAP call to avoid recursive locks. The locking
interface doesn't allow currently to specify recursive locks.
Should fix vnd device locking panics.
1997-10-20 00:11:03 +00:00
mycroft
7bbb69534f Add a missing splx(). From augustss. 1997-10-10 02:05:36 +00:00
jtc
d6ae2cd7fd Fix tipo inherited from old version of TNF copyright template. 1997-10-09 08:03:42 +00:00
thorpej
939e074dcc Implement DIOCGDEFLABEL. 1997-10-08 23:05:22 +00:00
thorpej
f26fad2f33 Add missing call to vndunlock(), per PR #3811, enami tsugutomo. 1997-08-26 18:12:58 +00:00
fair
c27c286843 %x -> 0x%x 1997-08-04 10:00:11 +00:00
kleink
d72a3b2da1 Leftover from last commit: require us to be initialized when a DIOCGDINFO
ioctl(2) is issued; the uninitialized disklabel pointer might get dereferenced
otherwise.
1997-06-26 16:28:34 +00:00
thorpej
8ad2b19321 In vndioctl(), consolidate checks for "open for writes" and "initialized",
and cover all of the cases we're supposed to cover.
1997-06-26 04:16:31 +00:00
thorpej
d69ef9b761 Remove an outdated comment that is not true with the Mach VM system. 1997-06-26 04:06:57 +00:00
thorpej
5029dd336b Add full disklabel and partition support to the vnd driver, allowing much
greater flexibility in its use.  Additionally, add support for "geometry
emulation".  This allows the "geometry" of the "disk" to be specified
at config time, providing near-perfect emulation of disklabel-less floppies,
CD-ROMs, etc., including non-512-byte sectors.  If a geometry is not
specified at config time, a default based on 1M cylinders will be used.
1997-06-23 21:03:55 +00:00
pk
5521477455 Remove attempt to use files with holes; it's prone to deadlocks. 1997-06-08 15:59:41 +00:00
pk
6c88c4ca23 Avoid race for residual count and pending requests count. 1997-06-08 15:55:34 +00:00
pk
f959841d17 Pass correct offset to vn_rdwr(). 1997-05-26 20:28:38 +00:00
pk
e571ff8ba8 Add code (#ifdef'ed VND_FILLHOLES for now) to fall back on vn_rdwr()
if VOP_BMAP() does not produce a translation.

IO_SYNC is used to prevent dirty file cache buffers. On a ffs filesystem,
once a hole is filled, subsequent vnd accesses find will find valid
VOP_BMAP() translations.

Concerns:
	* is the assumed semantics correct for all filesystems?
	* do we actually want the automagic extension on the VND
	  backing store..
1997-05-25 22:27:16 +00:00
pk
740da4fa88 Use an additional structure to keep information on a set of transfers
initiated by vnd_strategy(). This allows for more natural error handling
and solves two bugs:
	* vnd can disk_unbusy without disk_busy (PR#2657)
	* b_resid is set correctly on the external at the end
	  of a transfer in case of an error.
1997-05-25 19:37:36 +00:00
pk
317703b784 Pass correct transfer count to disk_unbusy(). 1997-05-25 16:21:45 +00:00
pk
0dae2eb53d Avoid negative values for b_dirtyend' and b_validend'. 1997-05-19 22:08:56 +00:00
pk
7a45e8a551 Fill in b_dirtyoff/b_dirtyend and b_validoff/b_validend appropriately
in each auxiliary buffer; the strategy routines (esp. NFS's) like that.
1997-05-19 14:41:54 +00:00
mycroft
8f8b0d91e5 Remove bogus use of splhigh(), and apparently unneeded bzero(). 1997-03-12 22:31:37 +00:00
thorpej
e0145dbc88 NFSCLIENT -> NFS 1997-01-31 05:18:51 +00:00
christos
86373f8cf9 backout kprintf changes 1996-10-13 01:37:04 +00:00
christos
5d85fa8122 printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:25:05 +00:00
christos
f44e9d22db Avoid problems with ptrdiff_t and size_t being different on different
architectures, by adding explicit casts to printf arguments. Is there
a better way to do this?
1996-09-25 02:22:10 +00:00
cgd
1c5ea3c014 print difference between pointers with %ld, so that -Wformat works
on the Alpha and for consistency.  Also, other minor formatting cleanups.
1996-07-10 18:15:22 +00:00
christos
e1930da21b Remove dependencies to dev_conf.h and the file itself. 1996-03-30 23:05:46 +00:00
christos
d2e6849829 fix printf() formats 1996-03-16 23:19:08 +00:00
christos
30c34c327f vnd.c: Typo (disk_deta{t,}ch) It was detach in the header file and
detatch everywhere else. Reverted to the english spelling.
       Also fixed the rest of the prototype warnings while I was at it.
ic/ncr5380sbc.c: Don't declare Debugger()... I have to clean this
		 everywhere :-(
1996-02-10 00:11:44 +00:00
thorpej
5b39541e48 New generic disk framework. Highlights:
- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.
1996-01-07 22:01:38 +00:00
thorpej
20783f6b85 Bring in several changes from the ccd:
* Be a bit better with prototypes
	* Use struct dkdevice in vnd_softc.
	* Prevent the unit from being unconfigured while open.
	* Implement a simple locking mechanism and use it for sanity's
	  sake.
Still needs more work; needs to support disklabels and the like.
1995-11-06 20:28:09 +00:00
mycroft
d40c1f54bd Lock the underlying vnode around VOP_BMAP() and VOP_READ(). From John Kohl. 1995-10-05 06:20:57 +00:00
mycroft
7263209ce6 Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely.  Remove d_strategy from cdevsw to
force the abstraction barrier.
1995-07-04 07:15:28 +00:00
cgd
bc9de32349 make dump stubs consistent 1995-06-26 05:34:44 +00:00
cgd
8f6f7fb7c9 use a buf-within-struct to avoid overloading b_pfcent. 1995-02-27 19:31:00 +00:00
cgd
d9f7c9f9be vn -> vnd renaming, for consistency 1995-01-25 04:45:38 +00:00
cgd
a596d50f29 various cleanups for -Wall, suggested by James Jegers. 1994-12-24 14:05:51 +00:00
mycroft
a395d884d5 Remove extra arg to d_open and vn_open(). 1994-12-14 19:09:13 +00:00
christos
c2c3dce760 added extra argument to vn_open 1994-11-14 06:00:10 +00:00
cgd
6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd
f32f66a23b fix (bogus) default ioctl return. 1994-08-24 16:49:16 +00:00
cgd
cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
cgd
89e331dcad new standard, minimally intrusive ID format 1994-06-27 19:40:57 +00:00
cgd
72cf8eaa9d kill some pre-lite code that was #ifdef'd appropriately 1994-06-14 00:25:43 +00:00
cgd
cf1b01e3cc provide upgrade notice 1994-05-24 01:05:33 +00:00
mycroft
19017044cf Get rid of the private vnread() and vnwrite(); they are the same as rawread()
and rawwrite().
1994-05-11 10:03:59 +00:00
mycroft
ef8ba60d24 Device strategy functions return void again. 1994-05-11 04:26:17 +00:00
cgd
28aa66d455 update from hibler 1994-04-20 05:01:22 +00:00
deraadt
8f09bb0623 add vnclose function 1994-02-27 08:41:11 +00:00