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

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