Skip to content
Commit 63dd86fa authored by Anand Jain's avatar Anand Jain Committed by Chris Mason
Browse files

btrfs: fix rw_devices miss match after seed replace



reproducer:
    reproducer:
    mount /dev/sdb /btrfs
    btrfs dev add /dev/sdc /btrfs
    btrfs rep start -B /dev/sdb /dev/sdd /btrfs
    umount /btrfs

WARNING: CPU: 0 PID: 3882 at fs/btrfs/volumes.c:892 __btrfs_close_devices+0x1c8/0x200 [btrfs]()

which is

        WARN_ON(fs_devices->rw_devices);

   The problem here is that we did not add one to the rw_devices when
   we replace the seed device with a writable device.

Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 25e8e911
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment