Subject: Re: CVS commit: src/sys/dev/raidframe
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Greg Oster <oster@cs.usask.ca>
List: current-users
Date: 04/01/2004 07:45:09
John Nemeth writes:
> On Jul 7,  9:15am, Greg Oster wrote:
> } 
> } Module Name:	src
> } Committed By:	oster
> } Date:		Sun Mar 21 21:08:08 UTC 2004
> } 
> } Modified Files:
> } 	src/sys/dev/raidframe: rf_driver.c
> } 
> } Log Message:
> } Yesterday's fix to rf_disks.c (rev 1.51) was necessary, but not
> } sufficient to clobber this nasty little bug.  The behaviour observed
> } was a panic when doing a 'raidctl -f' on a component when DAGs were
> } in flight for the given RAID set.  Unfortunatly, the faulty behaviour
> 
>      My curiosity has finally gotten the better of me.  What is a DAG?
> Besides a Directed Acyclic Graph.

In this case it's also a Directed Acyclic Graph :)

For each IO in RAIDframe, a DAG is built to describe the operations 
needed to perform the IO.  Nodes in the graph represent component IO 
operations.  E.g. For a given graph there might be Rod nodes (Read Old 
Data) and Wnp nodes (Write New Parity).  Edges in the graph represent 
dependencies.  E.g. You can't compute the parity till you have all 
the data for it, so a Wnp node would have a Rod node as a dependency 
(or 'antecedent', as the code calls it).  Nodes with no dependencies 
are ready to "fire".   When IO for a "fired" node completes, the nodes 
depending on it will have their dependency counts reduced, and when 
they hit zero, they "fire" too.  When all the nodes have "fired", the 
IO is complete.

The "RAIDframe Manual" available here: http://www.pdl.cmu.edu/RAIDframe/
describes the graphs used and their construction and execution in 
much more detail than you want me to (or I want to) provide here :)

Later...

Greg Oster