]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md-cluster: Defer MD reloading to mddev->thread
authorGuoqing Jiang <gqjiang@suse.com>
Sun, 20 Dec 2015 23:51:00 +0000 (10:51 +1100)
committerNeilBrown <neilb@suse.com>
Wed, 6 Jan 2016 00:39:10 +0000 (11:39 +1100)
commit15858fa5b00c1067a8a8e53ea32f4a65f8bebbb8
treee44bdb5eba07e589d43ef66725d3d0dfa45c4f4d
parentd323ef0f1a3e6d408eabacf0e91e2d741ffe1165
md-cluster: Defer MD reloading to mddev->thread

Reloading of superblock must be performed under reconfig_mutex. However,
this cannot be done with md_reload_sb because it would deadlock with
the message DLM lock. So, we defer it in md_check_recovery() which is
executed by mddev->thread.

This introduces a new flag, MD_RELOAD_SB, which if set, will reload the
superblock. And good_device_nr is also added to 'struct mddev' which is
used to get the num of the good device within cluster raid.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md-cluster.c
drivers/md/md.c
drivers/md/md.h