mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
md: merge mddev has_superblock into mddev_flags
There is not need to use a separate field in struct mddev, there are no functional changes. Link: https://lore.kernel.org/linux-raid/20260114171241.3043364-3-yukuai@fnnas.com Signed-off-by: Yu Kuai <yukuai@fnnas.com> Reviewed-by: Li Nan <linan122@huawei.com>
This commit is contained in:
@@ -6502,7 +6502,7 @@ int md_run(struct mddev *mddev)
|
||||
* the only valid external interface is through the md
|
||||
* device.
|
||||
*/
|
||||
mddev->has_superblocks = false;
|
||||
clear_bit(MD_HAS_SUPERBLOCK, &mddev->flags);
|
||||
rdev_for_each(rdev, mddev) {
|
||||
if (test_bit(Faulty, &rdev->flags))
|
||||
continue;
|
||||
@@ -6515,7 +6515,7 @@ int md_run(struct mddev *mddev)
|
||||
}
|
||||
|
||||
if (rdev->sb_page)
|
||||
mddev->has_superblocks = true;
|
||||
set_bit(MD_HAS_SUPERBLOCK, &mddev->flags);
|
||||
|
||||
/* perform some consistency tests on the device.
|
||||
* We don't want the data to overlap the metadata,
|
||||
@@ -9125,7 +9125,7 @@ void md_write_start(struct mddev *mddev, struct bio *bi)
|
||||
rcu_read_unlock();
|
||||
if (did_change)
|
||||
sysfs_notify_dirent_safe(mddev->sysfs_state);
|
||||
if (!mddev->has_superblocks)
|
||||
if (!test_bit(MD_HAS_SUPERBLOCK, &mddev->flags))
|
||||
return;
|
||||
wait_event(mddev->sb_wait,
|
||||
!test_bit(MD_SB_CHANGE_PENDING, &mddev->sb_flags));
|
||||
|
||||
Reference in New Issue
Block a user