Skip to contentSkip to conversation

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

PATCH Applied Alexander Fougner 2 participants 2 messages Nov 7, 2015 – Nov 13, 2015 Btrfs file system

lore
Share & tools
lore
#0 lore raw

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

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.

---
 cmds-device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmds-device.c +1 -1
index c2f3a40..dca30d7 100644
@@ -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++;
Signature · 1 line
2.6.2
Applied
#1 lore raw
Quoted 6 lines · Alexander Fougner

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.

Applied, thanks. Scheduled for 4.3.1.