[PATCH] FIX: Add spare throws exception (v2)

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

 



sync_metadata() requires st->sb to be loaded, otherwise exception is generated.
This fails expansion, because spares cannot be added.

metadata update uses tst instead st pointer, it is better than
loading anchor for st as I proposed previously.

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

 Manage.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Manage.c b/Manage.c
index 5808557..217c6b6 100644
--- a/Manage.c
+++ b/Manage.c
@@ -914,10 +914,10 @@ int Manage_subdevs(char *devname, int fd,
 					close(container_fd);
 					return 1;
 				}
-				if (st->update_tail)
-					flush_metadata_updates(st);
+				if (tst->update_tail)
+					flush_metadata_updates(tst);
 				else
-					tst->ss->sync_metadata(st);
+					tst->ss->sync_metadata(tst);
 
 				sra = sysfs_read(container_fd, -1, 0);
 				if (!sra) {

--
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