Blame SOURCES/0070-super-ddf-Remove-update_super_ddf.patch

01ff50
From 35aa44c549290e22f285896684c704acb53b7717 Mon Sep 17 00:00:00 2001
01ff50
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
01ff50
Date: Mon, 2 Jan 2023 09:35:18 +0100
01ff50
Subject: [PATCH 70/83] super-ddf: Remove update_super_ddf.
01ff50
01ff50
This is not supported by ddf.
01ff50
It hides errors by returning success status for some updates.
01ff50
Remove update_super_dff().
01ff50
01ff50
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
01ff50
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
01ff50
---
01ff50
 super-ddf.c | 70 -----------------------------------------------------
01ff50
 1 file changed, 70 deletions(-)
01ff50
01ff50
diff --git a/super-ddf.c b/super-ddf.c
01ff50
index 9d1e3b94..309812df 100644
01ff50
--- a/super-ddf.c
01ff50
+++ b/super-ddf.c
01ff50
@@ -2139,75 +2139,6 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info, cha
01ff50
 		}
01ff50
 }
01ff50
 
01ff50
-static int update_super_ddf(struct supertype *st, struct mdinfo *info,
01ff50
-			    char *update,
01ff50
-			    char *devname, int verbose,
01ff50
-			    int uuid_set, char *homehost)
01ff50
-{
01ff50
-	/* For 'assemble' and 'force' we need to return non-zero if any
01ff50
-	 * change was made.  For others, the return value is ignored.
01ff50
-	 * Update options are:
01ff50
-	 *  force-one : This device looks a bit old but needs to be included,
01ff50
-	 *        update age info appropriately.
01ff50
-	 *  assemble: clear any 'faulty' flag to allow this device to
01ff50
-	 *		be assembled.
01ff50
-	 *  force-array: Array is degraded but being forced, mark it clean
01ff50
-	 *	   if that will be needed to assemble it.
01ff50
-	 *
01ff50
-	 *  newdev:  not used ????
01ff50
-	 *  grow:  Array has gained a new device - this is currently for
01ff50
-	 *		linear only
01ff50
-	 *  resync: mark as dirty so a resync will happen.
01ff50
-	 *  uuid:  Change the uuid of the array to match what is given
01ff50
-	 *  homehost:  update the recorded homehost
01ff50
-	 *  name:  update the name - preserving the homehost
01ff50
-	 *  _reshape_progress: record new reshape_progress position.
01ff50
-	 *
01ff50
-	 * Following are not relevant for this version:
01ff50
-	 *  sparc2.2 : update from old dodgey metadata
01ff50
-	 *  super-minor: change the preferred_minor number
01ff50
-	 *  summaries:  update redundant counters.
01ff50
-	 */
01ff50
-	int rv = 0;
01ff50
-//	struct ddf_super *ddf = st->sb;
01ff50
-//	struct vd_config *vd = find_vdcr(ddf, info->container_member);
01ff50
-//	struct virtual_entry *ve = find_ve(ddf);
01ff50
-
01ff50
-	/* we don't need to handle "force-*" or "assemble" as
01ff50
-	 * there is no need to 'trick' the kernel.  When the metadata is
01ff50
-	 * first updated to activate the array, all the implied modifications
01ff50
-	 * will just happen.
01ff50
-	 */
01ff50
-
01ff50
-	if (strcmp(update, "grow") == 0) {
01ff50
-		/* FIXME */
01ff50
-	} else if (strcmp(update, "resync") == 0) {
01ff50
-//		info->resync_checkpoint = 0;
01ff50
-	} else if (strcmp(update, "homehost") == 0) {
01ff50
-		/* homehost is stored in controller->vendor_data,
01ff50
-		 * or it is when we are the vendor
01ff50
-		 */
01ff50
-//		if (info->vendor_is_local)
01ff50
-//			strcpy(ddf->controller.vendor_data, homehost);
01ff50
-		rv = -1;
01ff50
-	} else if (strcmp(update, "name") == 0) {
01ff50
-		/* name is stored in virtual_entry->name */
01ff50
-//		memset(ve->name, ' ', 16);
01ff50
-//		strncpy(ve->name, info->name, 16);
01ff50
-		rv = -1;
01ff50
-	} else if (strcmp(update, "_reshape_progress") == 0) {
01ff50
-		/* We don't support reshape yet */
01ff50
-	} else if (strcmp(update, "assemble") == 0 ) {
01ff50
-		/* Do nothing, just succeed */
01ff50
-		rv = 0;
01ff50
-	} else
01ff50
-		rv = -1;
01ff50
-
01ff50
-//	update_all_csum(ddf);
01ff50
-
01ff50
-	return rv;
01ff50
-}
01ff50
-
01ff50
 static void make_header_guid(char *guid)
01ff50
 {
01ff50
 	be32 stamp;
01ff50
@@ -5211,7 +5142,6 @@ struct superswitch super_ddf = {
01ff50
 	.match_home	= match_home_ddf,
01ff50
 	.uuid_from_super= uuid_from_super_ddf,
01ff50
 	.getinfo_super  = getinfo_super_ddf,
01ff50
-	.update_super	= update_super_ddf,
01ff50
 
01ff50
 	.avail_size	= avail_size_ddf,
01ff50
 
01ff50
-- 
01ff50
2.38.1
01ff50