[PATCH 5/6] raid0->raid10 takeover- create metadata update

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

 



Create metadata update for raid0 -> raid10 takeover.
Because we have no mdmon running for raid0 we have to
update metadata using local update mechanism

Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx>
---
 super-intel.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 7d2d777..63bd2d2 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -6802,7 +6802,19 @@ int imsm_takeover(struct supertype *st, struct geo_params *geo)
 		}
 	}
 
-	append_metadata_update(st, u, sizeof(struct imsm_update_takeover));
+	/* 0->10 transition- nothing to do here
+	 * all work will be done in prepare_update, process_update */
+	if (geo->level == 10)
+		u->direction = R0_TO_R10;
+
+	/* update metadata locally */
+	imsm_update_metadata_locally(st, u, sizeof(struct imsm_update_takeover));
+	/* and possibly remotely */
+	if (st->update_tail)
+		append_metadata_update(st, u, sizeof(struct imsm_update_takeover));
+	else
+		free(u);
+
 	return 0;
 }
 

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