nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: vishal.l.verma@intel.com
Cc: nvdimm@lists.linux.dev
Subject: [ndctl PATCH 1/2] ndctl/scrub: Stop translating return values
Date: Wed, 26 May 2021 16:33:04 -0700	[thread overview]
Message-ID: <162207198482.3715490.5994844104395495686.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <162207197868.3715490.6562405741837220139.stgit@dwillia2-desk3.amr.corp.intel.com>

In preparation for triggering a poll loop within ndctl_bus_start_scrub(),
stop translating return values into -EOPNOTSUPP.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
 ndctl/lib/libndctl.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c
index aa36a3c87c57..e5641feec23d 100644
--- a/ndctl/lib/libndctl.c
+++ b/ndctl/lib/libndctl.c
@@ -1354,14 +1354,8 @@ static int __ndctl_bus_get_scrub_state(struct ndctl_bus *bus,
 NDCTL_EXPORT int ndctl_bus_start_scrub(struct ndctl_bus *bus)
 	struct ndctl_ctx *ctx = ndctl_bus_get_ctx(bus);
-	int rc;
-	rc = sysfs_write_attr(ctx, bus->scrub_path, "1\n");
-	if (rc == -EBUSY)
-		return rc;
-	else if (rc < 0)
-		return -EOPNOTSUPP;
-	return 0;
+	return sysfs_write_attr(ctx, bus->scrub_path, "1\n");
 NDCTL_EXPORT int ndctl_bus_get_scrub_state(struct ndctl_bus *bus)

  reply	other threads:[~2021-05-26 23:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 23:32 [ndctl PATCH 0/2] ndctl/scrub: Fix start-scrub vs exponential backoff Dan Williams
2021-05-26 23:33 ` Dan Williams [this message]
2021-05-26 23:33 ` [ndctl PATCH 2/2] ndctl/scrub: Reread scrub-engine status at start Dan Williams

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162207198482.3715490.5994844104395495686.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    --subject='Re: [ndctl PATCH 1/2] ndctl/scrub: Stop translating return values' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).