[PATCH] improving netncp locking
Attilio Rao
attilio at freebsd.org
Wed Jan 28 11:06:12 PST 2009
Attached there is a patch that fixes netncp locking.
Actually, netncp tries to drain connections without any protection for
the nc_id field (which is supposed to discriminate between a valid
connection and one under draining).
Also, the drain still uses loose ending LK_DRAIN.
This patch adds correct locking for draining path adding an interlock,
control flags, a refcount and using it accordingly.
Ultimately 2 locks are switched to be sx as they don't rely on any
particular lockmgr feature.
The patch compiles and boots ok, but if someone could test and review
it I would appreciate a lot.
Thanks,
Attilio
--
Peace can only be achieved by understanding - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netncp.diff
Type: text/x-diff
Size: 14447 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090128/04458187/netncp.bin
More information about the freebsd-fs
mailing list