From: Jonathan Brassow Date: Thu, 12 Jul 2007 16:28:25 +0000 (+0100) Subject: dm raid1: clear region outside spinlock X-Git-Tag: v2.6.23-rc1~1092 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=943317efdbc295e8a28df3f5cbd549d066ee8b4a;p=pandora-kernel.git dm raid1: clear region outside spinlock A clear_region function is permitted to block (in practice, rare) but gets called in rh_update_states() with a spinlock held. The bits being marked and cleared by the above functions are used to update the on-disk log, but are never read directly. We can perform these operations outside the spinlock since the bits are only changed within one thread viz. - mark_region in rh_inc() - clear_region in rh_update_states(). So, we grab the clean_regions list items via list_splice() within the spinlock and defer clear_region() until we iterate over the list for deletion - similar to how the recovered_regions list is already handled. We then move the flush() call down to ensure it encapsulates the changes which are done by the later calls to clear_region(). Signed-off-by: Jonathan Brassow Signed-off-by: Alasdair G Kergon Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed