linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] FIX: Add spare throws exception (v2)
@ 2011-03-18  9:08 Adam Kwolek
  2011-03-20  4:48 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Kwolek @ 2011-03-18  9:08 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer

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@intel.com>
---

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-20  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18  9:08 [PATCH] FIX: Add spare throws exception (v2) Adam Kwolek
2011-03-20  4:48 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).