Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/dev/raidframe
Module Name: src
Committed By: oster
Date: Tue Mar 2 15:47:35 UTC 2004
Modified Files:
src/sys/dev/raidframe: rf_parityscan.c rf_raid1.c
Log Message:
Fix more cases where mutex locks were being held longer than necessary.
[For the record: The mcpair mutex is being used to protect mcpair->flag.
mcpair gets allocated before each call to rf_DispatchDAG(), so there is no
other process/thread that could be mucking with it. It is only used to
detect the completion of a given parity unit, and rf_DispatchDAG()
only uses it to setup the callback argument for rf_MCPairWakeupFunc()
which will be called when the IO completes. The code after the call
to rf_DispatchDAG() sits and waits for a 'wakeup' on mcpair->cond
(rf_MCPairWakeupFunc() does that). If mcpair->flag is 0 when
rf_DispatchDAG() completes, then rf_MCPairWakeupFunc() hasn't been
called yet (the IO hasn't completed). If it is 1, then the IO is
already done, and we continue on our merry way without sleeping.
Thus, we don't need to hold any lock on mcpair while calling
rf_DispatchDAG().]
To generate a diff of this commit:
cvs rdiff -r1.24 -r1.25 src/sys/dev/raidframe/rf_parityscan.c
cvs rdiff -r1.19 -r1.20 src/sys/dev/raidframe/rf_raid1.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index