[PATCH 06/16] FIX: suspend_hi and lo set to max and then to 0

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

 



After reshape suspend_lo and suspend_hi should be set to start values.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 super-intel.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 0896f1d..1f96cbc 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7750,6 +7750,7 @@ int imsm_grow_manage_size(struct supertype *st,
 	unsigned long long size;
 	int container_fd;
 	unsigned long long current_size = 0;
+	unsigned long long suspend_value;
 
 	/* finalize current volume reshape
 	 * for external meta size has to be managed by mdadm
@@ -7793,6 +7794,14 @@ int imsm_grow_manage_size(struct supertype *st,
 		"set size to %llu\n",
 		current_size, size);
 	sysfs_set_num(sra, NULL, "array_size", size);
+	/* manage suspend_* entries
+	 * set suspend_lo to suspend_hi value
+	 * and then push both to 0
+	 */
+	sysfs_get_ll(sra, NULL, "suspend_hi", &suspend_value);
+	sysfs_set_num(sra, NULL, "suspend_lo", suspend_value);
+	sysfs_set_num(sra, NULL, "suspend_hi", 0);
+	sysfs_set_num(sra, NULL, "suspend_lo", 0);
 
 	ret_val = 1;
 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux