thorpej
4356136193
Use the pool allocator for component buffer headers.
1998-07-31 01:23:56 +00:00
thorpej
902855d60e
Fix int32_t overflow with large serially concatenated components,
...
from Noriyuki SODA <soda@sra.co.jp>, PR #5729 .
1998-07-09 20:56:12 +00:00
ross
331fee623e
Sweep up some miscellaneous leftover lite2 integration shrapnel.
1998-03-01 07:15:39 +00:00
enami
9b770726e8
Fix message printed in case (b) in last commit; what actually shouldn't
...
exceeds is not a size of partition but end of partition.
1998-02-22 07:14:30 +00:00
enami
512a01869c
Check disklabel just read from disk and warn if:
...
(a) total sector size is different from the size of ccd, or
(b) size of a partition exceeds the size of ccd.
1998-02-22 06:50:08 +00:00
thorpej
fd01cb624f
Allow a ccd component to be on any partition type.
1998-02-06 08:13:07 +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
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
4cea35eb42
In ccdioctl(), consolidate checks for "open for writes" and "initialized".
1997-06-26 04:25:50 +00:00
thorpej
e06bb29b00
Two changes to ccdsize():
...
- If the partition was previously open, don't do the open/close steps.
(Sync with other disk drivers.)
- foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.
1997-06-23 23:59:53 +00:00
mycroft
8f8b0d91e5
Remove bogus use of splhigh(), and apparently unneeded bzero().
1997-03-12 22:31:37 +00:00
thorpej
9a815ed696
A performance optimization, inspired by a conversation with Thor Simon:
...
- Keep a freelist of component buffer headers, defaulting
to 8 headers per component (tunable with the CCDNBUF
kernel compile option).
- When allocating a component buffer, try to pull a header
off the freelist first, falling back on MALLOC() if the
freelist is empty. Use MALLOC() rather than malloc(),
because it will attempt to short-cut the allocation before
actually making a full-blown malloc() call.
- Keep statistics on how many component buffer headers have
been allocated and how many of those allocations have
resulted in freelist misses.
With these changes, I observed measurable decreases in system and
wall clock time on operations on an 8G ccd, as well as a measurable
drop in the time spent in ccdbuffer() (measured with kernel profiling).
1997-01-30 04:00:52 +00:00
thorpej
bb60822446
Fix OBOB in ccdopen() partition range check.
...
From Klaus Klein <kleink@layla.inka.de>, PR #3161 .
1997-01-30 03:32:56 +00:00
thorpej
7770d7c428
Compute the componet number properly so that error reporting is somewhat
...
meaningful. Bug noticed by Marshall Midden <m4@nts.umn.edu>.
1996-12-18 19:22:46 +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
thorpej
49c5d29ee0
Fix bogus return value in ccdopen(); it failed to indicate an error
...
condition if:
- ccd was not initialized
- partition did not exist
1996-05-05 04:21:14 +00:00
christos
cee6ac0ce3
remove sys/cpu.h
1996-04-22 01:26:39 +00:00
christos
e1930da21b
Remove dependencies to dev_conf.h and the file itself.
1996-03-30 23:05:46 +00:00
mrg
2c329c900b
%d -> %ld in a few places...
1996-03-24 01:26:57 +00:00
christos
d318abdbc4
prototypes for ccd audio and ncr5380
1996-03-07 15:00:07 +00:00
thorpej
ee8a2c002f
Copyright assigned to The NetBSD Foundation.
1996-02-28 01:01:17 +00:00
thorpej
91bd533c48
Avoid deref'ing a bad pointer in ccdopen(). This could happen if
...
any partition other than RAW_PART is opened before configuring the
ccd. Bug pointed out by Matthew Green.
1996-02-11 18:04:01 +00:00
hpeyerl
fb81581990
detatch this spelling mistake from this source file.
1996-02-10 22:27:22 +00:00
thorpej
b686e830b8
Fix typo, from Thorsten Frueauf <frueauf@ira.uka.de>.
1996-02-06 18:15:19 +00:00
thorpej
732dd94a83
Add experimental data mirroring support, derived from code written by
...
Satoshi Asami and Nisha Talagala. For details on using data mirroring,
see the ccd(4) manual page.
1996-02-01 20:47:13 +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
7268bf552d
When unconfiguring a ccd, only free as many interleave indices as
...
were allocated, which may not be the same as the number of components
in the ccd. From Don Lewis <gdonl@gv.ssi1.com>. Fixes PR #1820 .
1995-12-08 19:13:26 +00:00
thorpej
664cb04670
Fix a race condition where if a process is asleep waiting on an
...
exclusive lock of a ccd device while another process is unconfiguring
that same device, the first process would never awaken (unless interrupted).
1995-11-06 19:58:01 +00:00
thorpej
f85819bc44
In ccdstart(), only translate the block number from partition-relative
...
to absolute if part != RAW_PART.
1995-11-03 02:35:54 +00:00
thorpej
89d4987e5d
Fix bad pointer deref, memory leak, and geometry calculation, pointed
...
out by Jochen Pohl in PR #1588 . Change the interleave index to an
array of ints rather than an array of chars to avoid losing in the event
one has more than 127 components.
1995-10-12 21:28:32 +00:00
thorpej
a1bc374083
Batting 1.000: fix a potential panic situation in ccdioctl() that can occur
...
if ccdinit() fails.
1995-10-09 05:37:57 +00:00
thorpej
ab0109ad89
Fix up a couple of comments.
1995-10-09 05:21:09 +00:00
thorpej
4e3112d39b
Add the partition offset to the block number in ccdstart() as opposed
...
to ccdstrategy(), and do it in a way that doesn't corrupt the block number
for residuals. (What was I _thinking_?!)
1995-10-09 01:45:34 +00:00
thorpej
b8dcfbd303
Implement a simple locking mechanism and use it, for sanity's sake.
...
In ccdopen(), don't update the disklabel if any partition is already open.
Prevents race bewteen ccdstrategy() and ccdgetdisklabel().
1995-10-09 00:46:45 +00:00
thorpej
7e85a5a412
Fix misplaced #ifdef.
1995-09-06 04:15:59 +00:00
thorpej
0696b30519
Wrap dk stats stuff in `#ifdef WORKING_DISK_STATISTICS'. Takes care
...
of PR #1388 until such time as dk stats works on all ports. XXX !!
1995-08-29 23:13:44 +00:00
thorpej
a2db2c1899
Fix typo, pointed out by cross@va.pubnix.com (Chris P. Ross).
1995-08-21 18:25:52 +00:00
thorpej
77d85de272
New version of ccd. Allows dynamic run-time configuration and
...
unconfiguration and supports disklabels.
1995-08-17 16:31:30 +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
f6589edbc7
spaces -> tab
1995-03-09 02:20:34 +00:00
cgd
a44a276543
from jason thorpe: add ccdclose(), make it work with the MI scsi code,
...
and add knowledge of i386 disk device names (XXX).
1995-03-02 06:40:38 +00:00
cgd
f694af6712
don't overload buffer structs; allocate and use a 'super-struct' instead.
1995-03-02 06:38:11 +00:00
cgd
6ac2bbfc35
be more careful with types, also pull in headers where necessary.
1994-10-30 21:43:03 +00:00
mycroft
06476a4e53
ccdevsw --> cdevsw
1994-08-14 07:41:08 +00:00
hpeyerl
3214723fcf
These should have been the 4.4Lite versions. duh.
1994-07-02 06:03:47 +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