From: Josef Bacik <josef@toxicpanda.com>
To: linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: [PATCH v3 08/29] btrfs-progs: move NO_RESULT definition into replace.c
Date: Wed, 23 Nov 2022 17:37:16 -0500 [thread overview]
Message-ID: <c3684ffba5f135b2611b78f11e304fcfd27bf75f.1669242804.git.josef@toxicpanda.com> (raw)
In-Reply-To: <cover.1669242804.git.josef@toxicpanda.com>
BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT is defined to make sure we
differentiate internal errors from actual error codes that come back
from the device replace ioctl. Take this out of ioctl.c and move it
into replace.c.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
cmds/replace.c | 2 ++
ioctl.h | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmds/replace.c b/cmds/replace.c
index 28e70b04..bdb74dff 100644
--- a/cmds/replace.c
+++ b/cmds/replace.c
@@ -45,6 +45,8 @@ static int print_replace_status(int fd, const char *path, int once);
static char *time2string(char *buf, size_t s, __u64 t);
static char *progress2string(char *buf, size_t s, int progress_1000);
+/* Used to separate internal errors from actual dev replace ioctl results. */
+#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT -1
static const char *replace_dev_result2string(__u64 result)
{
diff --git a/ioctl.h b/ioctl.h
index 21aaedde..686c1035 100644
--- a/ioctl.h
+++ b/ioctl.h
@@ -192,7 +192,6 @@ BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_replace_status_params) == 48);
#define BTRFS_IOCTL_DEV_REPLACE_CMD_START 0
#define BTRFS_IOCTL_DEV_REPLACE_CMD_STATUS 1
#define BTRFS_IOCTL_DEV_REPLACE_CMD_CANCEL 2
-#define BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT -1
#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
--
2.26.3
next prev parent reply other threads:[~2022-11-23 22:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 22:37 [PATCH v3 00/29] prep and initial sync of kernel code Josef Bacik
2022-11-23 22:37 ` [PATCH v3 01/29] btrfs-progs: turn on more compiler warnings and use -Wall Josef Bacik
2022-11-24 20:59 ` David Sterba
2022-11-28 16:05 ` Josef Bacik
2022-11-23 22:37 ` [PATCH v3 02/29] btrfs-progs: fix make clean to clean convert properly Josef Bacik
2022-11-28 5:32 ` Anand Jain
2022-11-23 22:37 ` [PATCH v3 03/29] btrfs-progs: properly test for send_stream_version Josef Bacik
2022-11-28 7:34 ` Anand Jain
2022-11-28 17:19 ` David Sterba
2022-11-23 22:37 ` [PATCH v3 04/29] btrfs-progs: use -std=gnu11 Josef Bacik
2022-11-28 8:19 ` Anand Jain
2022-11-28 16:09 ` Josef Bacik
2022-11-28 17:53 ` David Sterba
2022-11-23 22:37 ` [PATCH v3 05/29] btrfs-progs: move btrfs_err_str into common/utils.h Josef Bacik
2022-11-28 8:56 ` Anand Jain
2022-11-23 22:37 ` [PATCH v3 06/29] btrfs-progs: rename qgroup items to match the kernel naming scheme Josef Bacik
2022-11-23 22:37 ` [PATCH v3 07/29] btrfs-progs: make btrfs_qgroup_level helper match the kernel Josef Bacik
2022-11-23 22:37 ` Josef Bacik [this message]
2022-11-23 22:37 ` [PATCH v3 09/29] btrfs-progs: rename BLOCK_* to IMAGE_BLOCK_* for metadump Josef Bacik
2022-11-23 22:37 ` [PATCH v3 10/29] btrfs-progs: rename btrfs_item_end to btrfs_item_data_end Josef Bacik
2022-11-23 22:37 ` [PATCH v3 11/29] btrfs-progs: copy ioctl.h into libbtrfs Josef Bacik
2022-11-23 22:37 ` [PATCH v3 12/29] btrfs-progs: sync uapi/btrfs.h into btrfs-progs Josef Bacik
2022-11-25 0:07 ` David Sterba
2022-11-23 22:37 ` [PATCH v3 13/29] btrfs-progs: stop using btrfs_root_item_v0 Josef Bacik
2022-11-23 22:37 ` [PATCH v3 14/29] btrfs-progs: make the find extent buffer helpers take fs_info Josef Bacik
2022-11-23 22:37 ` [PATCH v3 15/29] btrfs-progs: move dirty eb tracking to it's own io_tree Josef Bacik
2022-11-23 22:37 ` [PATCH v3 16/29] btrfs-progs: do not pass io_tree into verify_parent_transid Josef Bacik
2022-11-23 22:37 ` [PATCH v3 17/29] btrfs-progs: move extent cache code directly into btrfs_fs_info Josef Bacik
2022-11-23 22:37 ` [PATCH v3 18/29] btrfs-progs: delete state_private code Josef Bacik
2022-11-23 22:37 ` [PATCH v3 19/29] btrfs-progs: rename extent buffer flags to EXTENT_BUFFER_* Josef Bacik
2022-11-23 22:37 ` [PATCH v3 20/29] btrfs-progs: sync ondisk definitions from the kernel Josef Bacik
2022-11-23 22:37 ` [PATCH v3 21/29] btrfs-progs: sync compression.h " Josef Bacik
2022-11-23 22:37 ` [PATCH v3 22/29] btrfs-progs: sync messages.* " Josef Bacik
2022-11-23 22:37 ` [PATCH v3 23/29] btrfs-progs: replace btrfs_leaf_data with btrfs_item_nr_offset Josef Bacik
2022-11-23 22:37 ` [PATCH v3 24/29] btrfs-progs: don't use btrfs_header_csum helper Josef Bacik
2022-11-23 22:37 ` [PATCH v3 25/29] btrfs-progs: make write_extent_buffer take a const eb Josef Bacik
2022-11-23 22:37 ` [PATCH v3 26/29] btrfs-progs: sync accessors.[ch] from the kernel Josef Bacik
2022-11-23 22:37 ` [PATCH v3 27/29] btrfs-progs: sync file-item.h into progs Josef Bacik
2022-11-23 22:37 ` [PATCH v3 28/29] btrfs-progs: sync async-thread.[ch] from the kernel Josef Bacik
2022-11-23 22:37 ` [PATCH v3 29/29] btrfs-progs: sync extent-io-tree.[ch] and misc.h " Josef Bacik
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=c3684ffba5f135b2611b78f11e304fcfd27bf75f.1669242804.git.josef@toxicpanda.com \
--to=josef@toxicpanda.com \
--cc=kernel-team@fb.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).