]> git.baikalelectronics.ru Git - kernel.git/commit
md-cluster: fix bitmap sub-offset in bitmap_read_sb
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Wed, 1 Jul 2015 02:19:56 +0000 (12:19 +1000)
committerNeilBrown <neilb@suse.com>
Fri, 24 Jul 2015 03:37:55 +0000 (13:37 +1000)
commitebb64dde8496787bab33ce2cf4ee5c0d625d636c
tree453697d25fb88f8d55d720cddf3a3df0a1c696f5
parent4d26fd7ca6caabb3a86d626a71b5a25a2c183ef5
md-cluster: fix bitmap sub-offset in bitmap_read_sb

bitmap_read_sb is modifying mddev->bitmap_info.offset. This works for
the first bitmap read. However, when multiple bitmaps need to be opened
by the same node, it ends up corrupting the offset. Fix it by using a
local variable.

Also, bitmap_read_sb is not required in bitmap_copy_from_slot since
it is called in bitmap_create. Remove bitmap_read_sb().

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/bitmap.c