From: Mateusz Kusiak <mateusz.kusiak@intel.com>
To: linux-raid@vger.kernel.org
Cc: jes@trained-monkey.org, colyli@suse.de
Subject: [PATCH 04/10] super-ddf: Remove update_super_ddf.
Date: Thu, 18 Aug 2022 16:56:15 +0200 [thread overview]
Message-ID: <20220818145621.21982-5-mateusz.kusiak@intel.com> (raw)
In-Reply-To: <20220818145621.21982-1-mateusz.kusiak@intel.com>
This is not supported by ddf.
It hides errors by returning success status for some updates.
Remove update_super_dff().
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
---
super-ddf.c | 70 -----------------------------------------------------
1 file changed, 70 deletions(-)
diff --git a/super-ddf.c b/super-ddf.c
index 949e7d15..ec59b8af 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2139,75 +2139,6 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info, cha
}
}
-static int update_super_ddf(struct supertype *st, struct mdinfo *info,
- char *update,
- char *devname, int verbose,
- int uuid_set, char *homehost)
-{
- /* For 'assemble' and 'force' we need to return non-zero if any
- * change was made. For others, the return value is ignored.
- * Update options are:
- * force-one : This device looks a bit old but needs to be included,
- * update age info appropriately.
- * assemble: clear any 'faulty' flag to allow this device to
- * be assembled.
- * force-array: Array is degraded but being forced, mark it clean
- * if that will be needed to assemble it.
- *
- * newdev: not used ????
- * grow: Array has gained a new device - this is currently for
- * linear only
- * resync: mark as dirty so a resync will happen.
- * uuid: Change the uuid of the array to match what is given
- * homehost: update the recorded homehost
- * name: update the name - preserving the homehost
- * _reshape_progress: record new reshape_progress position.
- *
- * Following are not relevant for this version:
- * sparc2.2 : update from old dodgey metadata
- * super-minor: change the preferred_minor number
- * summaries: update redundant counters.
- */
- int rv = 0;
-// struct ddf_super *ddf = st->sb;
-// struct vd_config *vd = find_vdcr(ddf, info->container_member);
-// struct virtual_entry *ve = find_ve(ddf);
-
- /* we don't need to handle "force-*" or "assemble" as
- * there is no need to 'trick' the kernel. When the metadata is
- * first updated to activate the array, all the implied modifications
- * will just happen.
- */
-
- if (strcmp(update, "grow") == 0) {
- /* FIXME */
- } else if (strcmp(update, "resync") == 0) {
-// info->resync_checkpoint = 0;
- } else if (strcmp(update, "homehost") == 0) {
- /* homehost is stored in controller->vendor_data,
- * or it is when we are the vendor
- */
-// if (info->vendor_is_local)
-// strcpy(ddf->controller.vendor_data, homehost);
- rv = -1;
- } else if (strcmp(update, "name") == 0) {
- /* name is stored in virtual_entry->name */
-// memset(ve->name, ' ', 16);
-// strncpy(ve->name, info->name, 16);
- rv = -1;
- } else if (strcmp(update, "_reshape_progress") == 0) {
- /* We don't support reshape yet */
- } else if (strcmp(update, "assemble") == 0 ) {
- /* Do nothing, just succeed */
- rv = 0;
- } else
- rv = -1;
-
-// update_all_csum(ddf);
-
- return rv;
-}
-
static void make_header_guid(char *guid)
{
be32 stamp;
@@ -5211,7 +5142,6 @@ struct superswitch super_ddf = {
.match_home = match_home_ddf,
.uuid_from_super= uuid_from_super_ddf,
.getinfo_super = getinfo_super_ddf,
- .update_super = update_super_ddf,
.avail_size = avail_size_ddf,
--
2.26.2
next prev parent reply other threads:[~2022-08-18 14:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 14:56 [PATCH 00/10] Block update-subarray and refactor context update Mateusz Kusiak
2022-08-18 14:56 ` [PATCH 01/10] mdadm: Add option validation for --update-subarray Mateusz Kusiak
2022-09-13 15:12 ` Coly Li
2022-09-22 11:21 ` Kusiak, Mateusz
2022-08-18 14:56 ` [PATCH 02/10] Fix --update-subarray on active volume Mateusz Kusiak
2022-09-14 15:02 ` Coly Li
2022-08-18 14:56 ` [PATCH 03/10] Add code specific update options to enum Mateusz Kusiak
2022-09-14 15:02 ` Coly Li
2022-08-18 14:56 ` Mateusz Kusiak [this message]
2022-09-14 15:03 ` [PATCH 04/10] super-ddf: Remove update_super_ddf Coly Li
2022-08-18 14:56 ` [PATCH 05/10] super0: refactor the code for enum Mateusz Kusiak
2022-09-14 15:03 ` Coly Li
2022-09-22 11:21 ` Kusiak, Mateusz
2022-09-22 18:20 ` Jes Sorensen
2022-08-18 14:56 ` [PATCH 06/10] super1: " Mateusz Kusiak
2022-09-14 15:03 ` Coly Li
2022-09-22 11:21 ` Kusiak, Mateusz
2022-12-28 14:29 ` Jes Sorensen
2022-08-18 14:56 ` [PATCH 07/10] super-intel: " Mateusz Kusiak
2022-09-14 15:03 ` Coly Li
2022-09-22 11:22 ` Kusiak, Mateusz
2022-08-18 14:56 ` [PATCH 08/10] Change update to enum in update_super and update_subarray Mateusz Kusiak
2022-09-03 5:57 ` Coly Li
2022-09-14 15:03 ` Coly Li
2022-09-22 11:22 ` Kusiak, Mateusz
2022-08-18 14:56 ` [PATCH 09/10] Manage&Incremental: code refactor, string to enum Mateusz Kusiak
2022-09-14 15:03 ` Coly Li
2022-08-18 14:56 ` [PATCH 10/10] Change char* to enum in context->update & refactor code Mateusz Kusiak
2022-09-14 15:03 ` Coly Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220818145621.21982-5-mateusz.kusiak@intel.com \
--to=mateusz.kusiak@intel.com \
--cc=colyli@suse.de \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).