Commit Graph

820 Commits

Author SHA1 Message Date
oster
e021b3e6a7 Rework/simplify the disk queuing code. A bunch of this was still
holdovers from the simulator and would never be seen/used in-kernel.
2009-03-23 18:38:54 +00:00
cegger
df7f595ecd Ansify function definitions w/o arguments. Generated with sed. 2009-03-18 10:22:21 +00:00
cegger
b8817e4aed ansify function definitions 2009-03-15 17:14:40 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
ad
0fa70e9b6f 'boot -z' bogons 2009-03-14 11:08:28 +00:00
oster
b39a5d4daa Nuke a DIAGNOSTIC check that is no longer useful, even for DIAGNOSTIC. 2009-02-28 23:11:11 +00:00
oster
d7dbe2c6b8 It seems that some SCSI drivers can block while the spinlock on a given
disk queue is being held.  Work around this by dropping the lock before
bdev_strategy(), and re-grabbing the lock afterwards.  This is a
temporary measure until I get to gutting this queue locking code.

There has been some success with this in addressing PR#39993.
This patch is from Antti Kantee.  Thanks!
2009-02-28 22:02:17 +00:00
oster
f17e8d67c4 If we see a RF_RECON_WRITE_ERROR event we know a write has finished and
we need to account for that.  Failure to do so means we can end up
waiting forever for writes we think are outstanding, but which have
already completed.

Addresses the RAIDframe part of PR#40569.  Thanks to Matthias Scheler
for reporting the issue and verifying the fix.
2009-02-11 23:54:10 +00:00
oster
2240ff3c50 Nuke #define MAXNSTRIPES which is no longer useful. 2009-02-07 20:41:30 +00:00
oster
ce32c4d01e Be consistent with wd.c and don't complain loudly if the underlying
device doesn't support flushing the cache.  Fixes an issue (reported
privately) where ST39120A drives are not capable of flushing the
cache, and RAIDFrame was incessantly complaining.
2009-02-07 20:36:49 +00:00
christos
5dd7ffdfb6 add compat50 ioctls. 2009-01-18 16:37:19 +00:00
yamt
70de973662 g/c BUFQ_FOO() macros and use bufq_foo() directly. 2009-01-13 13:33:58 +00:00
oster
6d132f42c6 Implement DIOCCACHESYNC for RAIDframe too. 2009-01-11 21:58:41 +00:00
oster
73225b15a5 When unconfiguring an array where a reconstruct is in progress, abort
the reconstruct and wait for IOs to drain before pulling the plug.

Should fix the panic reported by der Mouse on tech-kern.
2008-12-20 17:04:51 +00:00
cegger
9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
ad
54ef467580 _KERNEL_OPT 2008-11-18 14:29:55 +00:00
oster
f29979e70c Undo previous change to an #if 0. The code does belong to the
distributed sparing bits, but no-one has compile-tested the code.
Un-breaks the ALL build.
2008-09-28 16:17:17 +00:00
oster
6658196076 Cleanup some of the spare table stuff. It is not needed in the general
case, and is only needed for parity declustering with distributed
sparing.
2008-09-27 21:58:04 +00:00
oster
c4025116b9 Nuke unneeded printf(). Spotted by pooka@. 2008-09-23 21:36:35 +00:00
reinoud
f6a70673ba Mark a buffer busy in getnewbuf() when it came from the pool_cache since
its not on a free list.

Also change buf_init() to not automatically mark buffers `busy' since this
only makes sense for bufcache buffers.

Mark all buf_init'd buffers 'busy' on the places where they ought to be
flagged as such to not confuse the buffer cache.

Fixes PR 38923.
2008-06-17 14:53:10 +00:00
oster
bd09a31134 We don't care about md devices here. Fixes issue reported by Jukka Salmi
on current-users.  Thanks!
2008-06-16 16:58:26 +00:00
drochner
1f0a423884 use new "defpseudodev" where appropriate, and remove dummy interface
attribute definitions which were only to trick config(8)
2008-06-10 12:49:16 +00:00
oster
ea16b13f64 - Use bdev_strategy() instead of VOP_STRATEGY().
- Don't bother taking the v_interlock or bumping b_vp->v_numoutput --
there won't be any other writers for this bp, and so there's no point
doing this locking song'n'dance.

Patch from Juergen Hannken-Illjes.  Thanks!!!

Addresses PR#38856.  With this change I've been unable to
replicate the hard hangs.
2008-06-07 17:50:34 +00:00
oster
fcd3b36217 Add in a missing "bp->b_resid = bp->b_bcount" in the EIO case.
Spotted by Juergen Hannken-Illjes.  Thanks!
2008-05-20 00:29:54 +00:00
oster
396f9f4598 Re-work some of the guts of the reconstruction code.
Reconmap used to have one pointer for every reconstruction unit.  This
does not scale well in the land of 1TB disks, where some 100MB+ of
"status pointers" are required for typical configurations.  Convert
the reconstruction code to use a "sliding status window" which will
scale nicely regardless of the number of stripes/reconstruction units
in the RAID set.  Convert the main reconstruction loop to rebuild the
array in chunks rather than in one big lump.

As part of these changes, introduce a function to kick any waiters on
the head separation callback list, and use that in the main
reconstruction event queue to wake up the waiters if things have
stalled.  (I believe this may fix a race condition that could occur at
at least at the very end of a disk during reconstruction under heavy
IO load.)

Thanks to Brian Buhrow for all his help, support, and patience in
testing these changes.
2008-05-19 19:49:54 +00:00
oster
5a9093cfac Both StripeUnitsPerParityUnit and StripeUnitsPerReconstructUnit need
to be positive integers.
2008-05-04 20:57:23 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
oster
6fef1b6c62 Cleanup function prototypes. No functional change. 2008-04-20 20:46:41 +00:00
oster
5654bb482d Introduce a function to return the default head separation for RAID 1
sets.  This helps ensure that the sliding status window (coming soon!)
for reconstructs will always be correct.
2008-04-20 20:42:32 +00:00
oster
8fb49f6fa8 A forced recon read should not default to indicating that the reads
for that disk have stopped, since this will bump us out of the normal
reconstruction loop prematurely.

Fixes the (mostly cosmetic) bug where the reconstruction
status values stop updating, and from raidctl it appears that
reconstruction has totally stalled (which it actually hasn't -- the
reconstruction does complete properly, but not in the normal way).
2008-04-15 16:05:43 +00:00
oster
25c8cdfd32 Print out the status value if a reconstruction read fails.
Don't print out write promotions during reconstruct unless
we are debugging reconstructs.
2008-04-14 17:24:50 +00:00
sborrill
244791d8a2 Fix display of total number of sectors if > 2^32 on 32-bit machines 2008-04-14 14:53:52 +00:00
cegger
92e3ef7aaa use aprint_*_dev and device_xname 2008-04-05 18:54:10 +00:00
ad
a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
oster
ce72acea08 rf_debugMem.c: remove unused 'rc' variable for RF_DEBUG_MEM.
rf_driver.c: minor comment tweak.  Improve debugging output in
             RF_DEBUG_QUIESCE.
rf_states.c: fix argument to rf_PrintDAGList() in the
             RF_DEBUG_VALIDATE_DAG case.


Changes from Olivier Cherrier.  Thanks!!
2008-02-12 03:12:41 +00:00
oster
287ee4e9a9 In a land before time, when kernel processes roamed the system, we
needed to keep track of the kernel process that opened a device in
order to close it with the right credentials.  Flash forward to today
where curlwp is now quite sufficient.
2008-01-26 20:44:37 +00:00
ad
0664a0459b Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
2008-01-04 21:17:40 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
oster
257eb7f26a Fix a 'use after free' issue with wedges and RAIDframe.
Problem reported and fix tested by Jeff Rizzo (Thanks!).
2007-12-18 01:09:46 +00:00
oster
7f102f3ada Use CFATTACH_DECL_NEW instead of CFATTACH_DECL... ICB wisdom
is that this will fix the config_devalloc panic.
2007-12-11 01:54:46 +00:00
ad
a0ca06de3d lockmgr -> mutex 2007-12-05 08:39:46 +00:00
jmcneill
13ca221015 aprintify 2007-12-01 18:10:48 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
oster
d5020b9a35 Nuke debugging output that is a) misleading at best, and
b) often just wrong.  Thanks to wiz for catching this.
2007-11-17 18:11:19 +00:00
yamt
b290d1aea3 don't include <sys/namei.h> unnecessarily. 2007-11-13 11:39:41 +00:00
oster
5bbb6a856e We need to initialize dk_driver as well. Thanks to Ronald Roskens
for reporting the problem and testing the fix.
2007-11-08 04:10:09 +00:00
oster
ba0b8a3b17 Implement support for drvctl in RAIDframe. Thanks to jnemeth@ for
initial patch.
2007-11-01 04:11:22 +00:00
ad
9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad
2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00