md: update superblock after changing rdev flags in state_store
authorXiao Ni <xni@redhat.com>
Wed, 13 Oct 2021 14:59:33 +0000 (22:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:16 +0000 (19:16 +0100)
commit9fff6457afad538e6768cbe5ccd93df09751c149
tree91128595d73bda7e61f3c1941331fc39cf438eef
parent22b68b015d44e249b04b7c77b269991922d46bc4
md: update superblock after changing rdev flags in state_store

[ Upstream commit 8b9e2291e355a0eafdd5b1e21a94a6659f24b351 ]

When the in memory flag is changed, we need to persist the change in the
rdev superblock flags. This is needed for "writemostly" and "failfast".

Reviewed-by: Li Feng <fengli@smartx.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/md.c