Thread (3 messages) 3 messages, 3 authors, 2010-01-29

Re: [mdadm PATCH] Kill: fix when zeroing busy devices.

From: Andre Noll <hidden>
Date: 2010-01-28 16:31:57

On 16:48, Artur Wojcik wrote:
quoted hunk ↗ jump to hunk
mdadm should not wait indefinitely when it trys to reset
superblock on device which is busy (cannot be opened).

Signed-off-by: Artur Wojcik <redacted>
---
 Kill.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Kill.c b/Kill.c
index 63442a6..a65b865 100644
--- a/Kill.c
+++ b/Kill.c
@@ -46,7 +46,7 @@ int Kill(char *dev, struct supertype *st, int force, int quiet, int noexcl)
 			fprintf(stderr, Name ": Couldn't open %s for write - not zeroing\n",
 				dev);
 		close(fd);
-		return 1;
+		return 2;
 	}
 	if (st == NULL)
 		st = guess_super(fd);
Jup.

	Acked-by: Andre Noll [off-list ref]

BTW: Mind to kill the close(fd) as well (as fd is negative) while
we're at it? A comment that explains the meaning of the return value
would also be nice.

Thanks
Andre
-- 
The only person who always got his work done by Friday was Robinson Crusoe

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help