From: Kent Overstreet Date: Mon, 16 Dec 2013 22:12:09 +0000 (-0800) Subject: bcache: bugfix for race between moving_gc and bucket_invalidate X-Git-Tag: v3.13-rc6~5^2~8^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d3d1a9c542b19dff1c7d7c8354d0869e4655287;p=pandora-kernel.git bcache: bugfix for race between moving_gc and bucket_invalidate There is a possibility for a bucket to be invalidated by the allocator while moving_gc was copying it's contents to another bucket, if the bucket only held cached data. To prevent this moving checks for a stale ptr (to an invalidated bucket), before and after reads. It it finds one, it simply ignores moving that data. This only affects bcache if the moving_gc was turned on, note that it's off by default. Signed-off-by: Nicholas Swenson Signed-off-by: Kent Overstreet --- Reading git-diff-tree failed