mdadm/0191-util-fix-sys_hot_remove_disk.patch

31 lines
841 B
Diff
Raw Permalink Normal View History

From 6f227de0a17369d3d6667591241c49140d5239b2 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Fri, 4 Oct 2024 13:57:48 +0200
Subject: [PATCH 191/201] util: fix sys_hot_remove_disk()
Instead of "remove", "faulty" was called.
Fixes: d95edceb362a ("sysfs: add function for writing to sysfs fd")
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util.c b/util.c
index 4dfe757d..7c5c5c8f 100644
--- a/util.c
+++ b/util.c
@@ -1855,8 +1855,8 @@ int hot_remove_disk(int mdfd, unsigned long dev, int force)
int sys_hot_remove_disk(int statefd, int force)
{
+ static const char val[] = "remove";
int cnt = force ? 500 : 5;
- static const char val[] = "faulty";
while (cnt--) {
int err = 0;
--
2.41.0