Btrfs: do not add replace target to the alloc_list
Btrfs: do not add replace target to the alloc_list

If replace was suspended by the umount, replace target device is added
to the fs_devices->alloc_list during a later mount.  This is obviously
wrong.  ->is_tgtdev_for_dev_replace is supposed to guard against that,
but ->is_tgtdev_for_dev_replace is (and can only ever be) initialized
*after* everything is opened and fs_devices lists are populated.  Fix
this by checking the devid instead: for replace targets it's always
equal to BTRFS_DEV_REPLACE_DEVID.

Cc: Stefan Behrens <64081170bd0bfeb600f351f87b86e7ba94295911@giantdisaster.de>
Signed-off-by: Ilya Dryomov <152d4c5bebf13a5b809d42b4d789cf9d887e6698@gmail.com>
Reviewed-by: Stefan Behrens <64081170bd0bfeb600f351f87b86e7ba94295911@giantdisaster.de>
Signed-off-by: Josef Bacik <631dfb3d07694fdcf26abc7aac2c6c2b641f8bde@fusionio.com>
Signed-off-by: Chris Mason <a169954b4cb1a46cee25f659d3bddfebe02b5fba@fusionio.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs