From: Eryu Guan <guaneryu@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Eryu Guan <guaneryu@gmail.com>
Subject: [PATCH] btrfs-progs: add new dev replace result
Date: Mon, 13 Oct 2014 12:42:13 +0800 [thread overview]
Message-ID: <1413175333-26095-2-git-send-email-guaneryu@gmail.com> (raw)
In-Reply-To: <1413175333-26095-1-git-send-email-guaneryu@gmail.com>
A new dev replace result was introduced by kernel commit
Btrfs: return failure if btrfs_dev_replace_finishing() failed
Make the userspace know about the new result too.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
cmds-replace.c | 2 ++
ioctl.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/cmds-replace.c b/cmds-replace.c
index 9fe7ad8..7a45cef 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -53,6 +53,8 @@ static const char *replace_dev_result2string(__u64 result)
return "not started";
case BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED:
return "already started";
+ case BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS:
+ return "scrub is in progress";
default:
return "<illegal result value>";
}
diff --git a/ioctl.h b/ioctl.h
index f0fc060..0e02fae 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -144,6 +144,7 @@ struct btrfs_ioctl_dev_replace_status_params {
#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR 0
#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NOT_STARTED 1
#define BTRFS_IOCTL_DEV_REPLACE_RESULT_ALREADY_STARTED 2
+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_SCRUB_INPROGRESS 3
struct btrfs_ioctl_dev_replace_args {
__u64 cmd; /* in */
__u64 result; /* out */
--
1.8.3.1
next prev parent reply other threads:[~2014-10-13 4:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-13 4:42 [PATCH v2] Btrfs: return failure if btrfs_dev_replace_finishing() failed Eryu Guan
2014-10-13 4:42 ` Eryu Guan [this message]
2014-10-13 6:23 ` Anand Jain
2014-10-13 6:59 ` Eryu Guan
2014-10-13 10:18 ` Anand Jain
2014-10-14 3:35 ` Eryu Guan
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=1413175333-26095-2-git-send-email-guaneryu@gmail.com \
--to=guaneryu@gmail.com \
--cc=linux-btrfs@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).