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

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