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

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