From: Chris Mason Date: Wed, 10 Jun 2009 19:17:02 +0000 (-0400) Subject: Btrfs: avoid races between super writeout and device list updates X-Git-Tag: v2.6.31-rc1~380^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5e9a5206a171b2c467e494aebcdcf70c47289bc;p=pandora-kernel.git Btrfs: avoid races between super writeout and device list updates On multi-device filesystems, btrfs writes supers to all of the devices before considering a sync complete. There wasn't any additional locking between super writeout and the device list management code because device management was done inside a transaction and super writeout only happened with no transation writers running. With the btrfs fsync log and other async transaction updates, this has been racey for some time. This adds a mutex to protect the device list. The existing volume mutex could not be reused due to transaction lock ordering requirements. Signed-off-by: Chris Mason --- Reading git-diff-tree failed