diff mbox

btrfs-progs: allow device deletion using 'missing' keyword again

Message ID 1446855984-5123-1-git-send-email-fougner89@gmail.com (mailing list archive)
State Accepted
Headers show

Commit Message

Alexander Fougner Nov. 7, 2015, 12:26 a.m. UTC
Device deletion procedures ensures the device is a block device.
This patch introduces 'missing' as keyword again, correctly
passing it on to the kernel instead of complaining about
'missing' not being a block device.

Signed-off-by: Alexander Fougner <fougner89@gmail.com>
---
 cmds-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Sterba Nov. 13, 2015, 3:13 p.m. UTC | #1
On Sat, Nov 07, 2015 at 01:26:24AM +0100, Alexander Fougner wrote:
> Device deletion procedures ensures the device is a block device.
> This patch introduces 'missing' as keyword again, correctly
> passing it on to the kernel instead of complaining about
> 'missing' not being a block device.
> 
> Signed-off-by: Alexander Fougner <fougner89@gmail.com>

Applied, thanks. Scheduled for 4.3.1.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/cmds-device.c b/cmds-device.c
index c2f3a40..dca30d7 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -161,7 +161,7 @@  static int _cmd_device_remove(int argc, char **argv,
 		struct	btrfs_ioctl_vol_args arg;
 		int	res;
 
-		if (is_block_device(argv[i]) != 1) {
+		if (is_block_device(argv[i]) != 1 && strcmp(argv[i], "missing")) {
 			fprintf(stderr,
 				"ERROR: %s is not a block device\n", argv[i]);
 			ret++;