Commit Graph

66 Commits

Author SHA1 Message Date
enami 34d63b5623 Since we now only allocate this one, no longer necessary to check and free(). 2000-02-08 12:56:00 +00:00
fvdl 0b1963121a Add Kirk McKusick's soft updates code to the trunk. Not enabled by
default, as the copyright on the main file (ffs_softdep.c) is such
that is has been put into gnusrc. options SOFTDEP will pull this
in. This code also contains the trickle syncer.

Bump version number to 1.4O
1999-11-15 18:49:07 +00:00
chs f13d3f5b3b from jason:
avoid biodone()ing the original buf twice when a component buf
gets an error.  fixes PR 8704.
1999-11-03 16:04:03 +00:00
thorpej dd5ae858e0 We really only need *one* componenet buffer pool... 1999-08-11 02:41:02 +00:00
mjacob fefcc128bf a kindler gentler fix 1999-03-04 02:38:19 +00:00
mjacob 7790083b17 adjust format args for compiler changes 1999-03-04 02:20:13 +00:00
thorpej 94962b67c7 Fix some printf format problems on Alpha. 1999-02-12 00:46:11 +00:00
thorpej c6aa25bfa1 Fix a st00p1d bug I introduced in rev 1.57, which would cause any activity
on non-0 CCD units to crash the system.
1999-01-21 00:35:15 +00:00
christos b62b5bc092 Make this compile again with -DDEBUG 1999-01-12 12:49:53 +00:00
thorpej 0272b2ab8e Whole lotta cleanup wrt. how configuration data is stored internally, and
just lockmgr(), not our home-grown locking functions.
1999-01-12 00:21:47 +00:00
thorpej d272bb0024 Handle the case where ccdbuffer() fails due to memory shortage. Build
a fifo of component buffers, and free them if ccdbuffer() fails.  Once
all component buffers are build, run through the fifo and fire off the
requests to the components.
1998-11-13 01:00:15 +00:00
thorpej 092c201932 Simplify calling of ccdbuffer() now that the mirroring code is nuked. 1998-11-13 00:35:57 +00:00
thorpej ab27c3f89c Return EINVAL if invalid flags are passed. 1998-11-13 00:31:02 +00:00
thorpej 00172c10d5 Nuke the mirroring code. RAIDframe is about to go in, and is a much
better mirroring solution.

The ccd driver will stay, even in the presence of RAIDframe, for applications
where just RAID-0 is needed (much smaller code footprint).
1998-11-13 00:26:19 +00:00
thorpej b6ac7c9b6b Must use PR_NOWAIT when allocating component buffers. 1998-11-12 22:39:57 +00:00
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