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 13:03:57 +0000 (14:03 +0100)
commit2338c3501726895c1657adda2308fcf9e6f17449
tree1c4395050d26dcd6afc0dab4c64c6d9f7f75f50b
parentb34ea3c91eacdc50c761506cab35b14f67216f76
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