]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
md-cluster: clear another node's suspend_area after the copy is finished
authorGuoqing Jiang <gqjiang@suse.com>
Mon, 2 Jul 2018 08:26:24 +0000 (16:26 +0800)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:50:40 +0000 (19:50 -0600)
commit7ed347ef15c0f33ef0eea0cf87cb0382837351eb
treee70b875738c97d4e42e0a1f67c7c241235e11200
parentb265b6202d1dea47645ebbf44aa69218cb5b36f1
md-cluster: clear another node's suspend_area after the copy is finished

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit 010228e4a932ca1e8365e3b58c8e1e44c16ff793 ]

When one node leaves cluster or stops the resyncing
(resync or recovery) array, then other nodes need to
call recover_bitmaps to continue the unfinished task.

But we need to clear suspend_area later after other
nodes copy the resync information to their bitmap
(by call bitmap_copy_from_slot). Otherwise, all nodes
could write to the suspend_area even the suspend_area
is not handled by any node, because area_resyncing
returns 0 at the beginning of raid1_write_request.
Which means one node could write suspend_area while
another node is resyncing the same area, then data
could be inconsistent.

So let's clear suspend_area later to avoid above issue
with the protection of bm lock. Also it is straightforward
to clear suspend_area after nodes have copied the resync
info to bitmap.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/md/md-cluster.c