Linux-BTRFS Archive on lore.kernel.org
 help / Atom feed
* [PATCH RESEND 1/2] btrfs-progs: check for no result before using results
@ 2019-02-22 17:43 Anand Jain
  2019-02-22 17:43 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2019-02-22 17:43 UTC (permalink / raw)
  To: linux-btrfs

User space understands the ioctl BTRFS_IOC_DEV_REPLACE command status
using the struct btrfs_ioctl_dev_replace_args::result, and so userspace
initializes this to BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT, so exclude
this value in checking for the error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-replace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmds-replace.c b/cmds-replace.c
index b30e6c781e64..42de4de8c031 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -296,6 +296,8 @@ static int cmd_replace_start(int argc, char **argv)
 		}
 
 		if (start_args.result !=
+		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT &&
+		    start_args.result !=
 		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) {
 			error("ioctl(DEV_REPLACE_START) on '%s' returns error: %s",
 				path,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH RESEND 1/2] btrfs-progs: check for no result before using results
@ 2019-01-31 10:05 Anand Jain
  2019-01-31 10:05 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2019-01-31 10:05 UTC (permalink / raw)
  To: linux-btrfs

User space understands the ioctl BTRFS_IOC_DEV_REPLACE command status
using the struct btrfs_ioctl_dev_replace_args::result, and so userspace
initializes this to BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT, so exclude
this value in checking for the error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-replace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmds-replace.c b/cmds-replace.c
index b30e6c781e64..42de4de8c031 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -296,6 +296,8 @@ static int cmd_replace_start(int argc, char **argv)
 		}
 
 		if (start_args.result !=
+		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT &&
+		    start_args.result !=
 		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) {
 			error("ioctl(DEV_REPLACE_START) on '%s' returns error: %s",
 				path,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH RESEND 1/2] btrfs-progs: check for no result before using results
@ 2019-01-16  3:13 Anand Jain
  2019-01-16  3:13 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2019-01-16  3:13 UTC (permalink / raw)
  To: linux-btrfs

User space understands the ioctl BTRFS_IOC_DEV_REPLACE command status
using the struct btrfs_ioctl_dev_replace_args::result, and so userspace
initializes this to BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT, so exclude
this value in checking for the error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-replace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmds-replace.c b/cmds-replace.c
index b30e6c781e64..42de4de8c031 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -296,6 +296,8 @@ static int cmd_replace_start(int argc, char **argv)
 		}
 
 		if (start_args.result !=
+		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT &&
+		    start_args.result !=
 		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) {
 			error("ioctl(DEV_REPLACE_START) on '%s' returns error: %s",
 				path,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH RESEND 1/2] btrfs-progs: check for no result before using results
@ 2019-01-08  4:09 Anand Jain
  2019-01-08  4:09 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
  0 siblings, 1 reply; 5+ messages in thread
From: Anand Jain @ 2019-01-08  4:09 UTC (permalink / raw)
  To: linux-btrfs

User space understands the ioctl BTRFS_IOC_DEV_REPLACE command status
using the struct btrfs_ioctl_dev_replace_args::result, and so userspace
initializes this to BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT, so exclude
this value in checking for the error.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-replace.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmds-replace.c b/cmds-replace.c
index b30e6c781e64..42de4de8c031 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -296,6 +296,8 @@ static int cmd_replace_start(int argc, char **argv)
 		}
 
 		if (start_args.result !=
+		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_RESULT &&
+		    start_args.result !=
 		    BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR) {
 			error("ioctl(DEV_REPLACE_START) on '%s' returns error: %s",
 				path,
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 17:43 [PATCH RESEND 1/2] btrfs-progs: check for no result before using results Anand Jain
2019-02-22 17:43 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
  -- strict thread matches above, loose matches on Subject: below --
2019-01-31 10:05 [PATCH RESEND 1/2] btrfs-progs: check for no result before using results Anand Jain
2019-01-31 10:05 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
2019-01-16  3:13 [PATCH RESEND 1/2] btrfs-progs: check for no result before using results Anand Jain
2019-01-16  3:13 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain
2019-01-08  4:09 [PATCH RESEND 1/2] btrfs-progs: check for no result before using results Anand Jain
2019-01-08  4:09 ` [PATCH RESEND 2/2] btrfs-progs: replace: gracefully handle the exclusive operation report Anand Jain

Linux-BTRFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-btrfs/0 linux-btrfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-btrfs linux-btrfs/ https://lore.kernel.org/linux-btrfs \
		linux-btrfs@vger.kernel.org linux-btrfs@archiver.kernel.org
	public-inbox-index linux-btrfs


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-btrfs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox