Whamcloud - gitweb
Zach and I found a nasty race condition with the sets: we were
authorpschwan <pschwan>
Mon, 3 Mar 2003 21:05:47 +0000 (21:05 +0000)
committerpschwan <pschwan>
Mon, 3 Mar 2003 21:05:47 +0000 (21:05 +0000)
commit3e167b88a43c56936721f72143e1c8189778ab43
tree7f7be8f94af44f0abbae675799ff63dff0d1ccb3
parent1a3ed56602cf86f6069178988a63b19ed09a9272
Zach and I found a nasty race condition with the sets: we were
overloading the refcount to mean both "number of outstanding I/Os" and
also "number of threads using this structure".  It was possible in
extreme circumstances to free the set in the reading thread before the
event handling thread called wake_up, which would thus crash.

To address this, there is a new count (brw_desc_count), which counts
the number of remaining I/Os.  The other count, brw_refcount, now
properly tracks users of the structure to prevent early freeing.
lustre/llite/iod.c