mbox series

[v2,0/2] Incremental mode: remove safety verification

Message ID 20221221063846.20710-1-kinga.tanska@intel.com (mailing list archive)
Headers show
Series Incremental mode: remove safety verification | expand

Message

Kinga Tanska Dec. 21, 2022, 6:38 a.m. UTC
Changes in incremental mode. Removing verification
if remove is safe, when this mode is triggered. Also
moving commit description to obey kernel coding style.

Kinga Tanska (2):
  incremental, manage: do not verify if remove is safe
  manage: move comment with function description

 Incremental.c |  2 +-
 Manage.c      | 79 +++++++++++++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 32 deletions(-)

Comments

Xiao Ni Dec. 22, 2022, 8:17 a.m. UTC | #1
Hi Kinga

For the series, it's ok for me.

Do you want to fix another regression problem? Now we can't set a
member disk as faulty when
array is active.

The original patch is used to make sure the admin doesn't remove the
disk and the raid can't work.
So it doesn't need to check the array state. How about

diff --git a/Manage.c b/Manage.c
index 9d85237ceab5..eee25fd8cda0 100644
--- a/Manage.c
+++ b/Manage.c
@@ -1322,8 +1322,7 @@ bool is_remove_safe(mdu_array_info_t *array,
const int fd, char *devname, const
        sysfs_free(mdi);

        bool is_enough = enough(array->level, array->raid_disks,
-                               array->layout, (array->state & 1),
-                               avail);
+                               array->layout, 1, avail);

        free(avail);
        return is_enough;

Regards
Xiao

On Wed, Dec 21, 2022 at 9:37 PM Kinga Tanska <kinga.tanska@intel.com> wrote:
>
> Changes in incremental mode. Removing verification
> if remove is safe, when this mode is triggered. Also
> moving commit description to obey kernel coding style.
>
> Kinga Tanska (2):
>   incremental, manage: do not verify if remove is safe
>   manage: move comment with function description
>
>  Incremental.c |  2 +-
>  Manage.c      | 79 +++++++++++++++++++++++++++++++--------------------
>  2 files changed, 49 insertions(+), 32 deletions(-)
>
> --
> 2.26.2
>