On 11/30/2017 05:54 PM, 彭良彦 wrote: > Here is the issue reproduce step. > 1. create a block device sdb by iSCSI > 2. echo /dev/sdb > /sys/fs/bcache/register and succeed to register //sdb is the block dev create by iSCSI > 3. disconnect network and reboot // without network, SET_BDEV_STATE(&dc->sb, BDEV_STATE_NONE) will fail > 4. create a block device sdb by iSCSI > 5. echo /dev/sdb > /sys/fs/bcache/register and fail to register since bdev state is not reset to BDEV_STATE_NONE > 6. make-bcache -B /dev/sdb --writeback --wipe-bcache > the last step will fail in original version since bdev handle is not released during register and open() is failed in make-bcache, with this patch, it will succeed But it is supposed to fail / wait in this case, if the cache device is not registered. It needs the cache device metadata in order to know the correct state of each piece of data. That is, when you are using writeback mode, you need the cache device, because some of the writes will go to the cache device and some to the backing device. Mike -- To unsubscribe from this list: send the line "unsubscribe linux-bcache" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html