linux/include/uapi
Anand Jain 6b526ed70c btrfs: introduce device delete by devid
This introduces new ioctl BTRFS_IOC_RM_DEV_V2, which uses enhanced struct
btrfs_ioctl_vol_args_v2 to carry devid as an user argument.

The patch won't delete the old ioctl interface and so kernel remains
backward compatible with user land progs.

Test case/script:
echo "0 $(blockdev --getsz /dev/sdf) linear /dev/sdf 0" | dmsetup create bad_disk
mkfs.btrfs -f -d raid1 -m raid1 /dev/sdd /dev/sde /dev/mapper/bad_disk
mount /dev/sdd /btrfs
dmsetup suspend bad_disk
echo "0 $(blockdev --getsz /dev/sdf) error /dev/sdf 0" | dmsetup load bad_disk
dmsetup resume bad_disk
echo "bad disk failed. now deleting/replacing"
btrfs dev del  3  /btrfs
echo $?
btrfs fi show /btrfs
umount /btrfs
btrfs-show-super /dev/sdd | egrep num_device
dmsetup remove bad_disk
wipefs -a /dev/sdf

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reported-by: Martin <m_btrfs@ml1.co.uk>
[ adjust messages, s/disk/device/ ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-04-28 10:59:13 +02:00
..
asm-generic generic syscalls: wire up preadv2 and pwritev2 syscalls 2016-04-23 22:38:08 +02:00
drm Merge tag 'topic/drm-misc-2016-03-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-03-16 11:09:26 +10:00
linux btrfs: introduce device delete by devid 2016-04-28 10:59:13 +02:00
misc cxl: Support to flash a new image on the adapter from a guest 2016-03-09 23:39:56 +11:00
mtd mtd: mtd-user: remove stdint.h include 2015-10-19 18:19:06 -07:00
rdma Merge branches 'i40iw', 'sriov' and 'hfi1' into k.o/for-4.6 2016-03-21 17:32:23 -04:00
scsi cxlflash: Fix to avoid virtual LUN failover failure 2016-01-06 20:50:08 -05:00
sound ALSA: seq: Provide card number / PID via sequencer client info 2016-03-08 10:52:52 +01:00
video
xen xen/gntdev: add ioctl for grant copy 2016-01-07 13:21:53 +00:00
Kbuild