Re: [PATCH v5 07/14] md: export helpers to stop sync_thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 1, 2024 at 1:30 AM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
>
[...]
> +
>  static void idle_sync_thread(struct mddev *mddev)
>  {
>         mutex_lock(&mddev->sync_mutex);
> -       clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
>
>         if (mddev_lock(mddev)) {
>                 mutex_unlock(&mddev->sync_mutex);
>                 return;
>         }
>
> +       clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
>         stop_sync_thread(mddev, false, true);
>         mutex_unlock(&mddev->sync_mutex);
>  }
> @@ -4936,13 +4965,13 @@ static void idle_sync_thread(struct mddev *mddev)
>  static void frozen_sync_thread(struct mddev *mddev)
>  {
>         mutex_lock(&mddev->sync_mutex);
> -       set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
>
>         if (mddev_lock(mddev)) {
>                 mutex_unlock(&mddev->sync_mutex);
>                 return;
>         }
>
> +       set_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
>         stop_sync_thread(mddev, false, false);
>         mutex_unlock(&mddev->sync_mutex);
>  }

The two changes above (moving set_bit) don't seem to belong
to this patch. If they are still needed, please submit a separate
patch.

Thanks,
Song





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux