Blame SOURCES/mdadm-3.3.2-Grow-close-file-descriptor-earlier-to-avoid-still-in.patch
|
|
efb5be |
From 10df72a080f71f01553a14ed8112cee6af7912e8 Mon Sep 17 00:00:00 2001
|
|
|
efb5be |
From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
|
|
|
efb5be |
Date: Wed, 23 Dec 2015 12:57:10 +0100
|
|
|
efb5be |
Subject: [PATCH] Grow: close file descriptor earlier to avoid "still in use"
|
|
|
efb5be |
when stopping
|
|
|
efb5be |
|
|
|
efb5be |
Close fd2 as soon as it is no longer needed, before calling
|
|
|
efb5be |
Grow_continue(). Otherwise, we won't be able to stop an array with
|
|
|
efb5be |
external metadata during reshape, because mdadm running in background
|
|
|
efb5be |
will be keeping it open.
|
|
|
efb5be |
|
|
|
efb5be |
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
|
|
|
efb5be |
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
|
|
|
efb5be |
Signed-off-by: NeilBrown <neilb@suse.com>
|
|
|
efb5be |
---
|
|
|
efb5be |
Grow.c | 3 +++
|
|
|
efb5be |
1 file changed, 3 insertions(+)
|
|
|
efb5be |
|
|
|
efb5be |
diff --git a/Grow.c b/Grow.c
|
|
|
efb5be |
index 89e4c34..bbdd46c 100755
|
|
|
efb5be |
--- a/Grow.c
|
|
|
efb5be |
+++ b/Grow.c
|
|
|
efb5be |
@@ -4885,6 +4885,9 @@ int Grow_continue_command(char *devname, int fd,
|
|
|
efb5be |
|
|
|
efb5be |
sysfs_init(content, fd2, mdstat->devnm);
|
|
|
efb5be |
|
|
|
efb5be |
+ close(fd2);
|
|
|
efb5be |
+ fd2 = -1;
|
|
|
efb5be |
+
|
|
|
efb5be |
/* start mdmon in case it is not running
|
|
|
efb5be |
*/
|
|
|
efb5be |
if (!mdmon_running(container))
|
|
|
efb5be |
--
|
|
|
efb5be |
2.5.0
|
|
|
efb5be |
|