I just finished moving my existing Fedora 20 root filesystem onto a bcache device (actually LVM on top of a bcache physical volume). The bcache cache device is /dev/sda2, a partition on my SSD; the backing device is /dev/md126p5, a partition on an Intel RAID (imsm) volume. This configuration only boots successfully about 50% of the time. The other 50% of the time, the bcache device is not created, and dracut times out and dumps me into an emergency shell. After changing the bcache-register script to use /sys/fs/bcache/register (instead of register_quiet), I see a "device busy" error when udev attempts to register the backing device: [ 2.105581] bcache: register_bcache() error opening /dev/md126p5: device busy This is kernel 3.5.15, so this doesn't mean that the device is already registered; something else has it (temporarily) opened. I say that it's opened temporarily, because I am able to register the backing device manually from the dracut shell -- which starts the the bcache device. Looking at /usr/lib/udev/bcache-register and the bcache_register source in drivers/md/bcache/super.c, I notice 2 things. (1) bcache-register gives up immediately when an error occurs because of a (possibly temporary) conflict. (2) Although the driver logs a different message in the already registered case ("device already registered" instead of "device busy"), it doesn't provide userspace with any way to distinguish the two cases; it always returns -EINVAL. Suggested fix: (1) Change bcache_register to return -EBUSY in the device busy case (while still returning -EINVAL in the already registered case). (2) Change bcache-register to check the exit code of the registration attempt and retry in the EBUSY case. Does this make sense? -- ======================================================================== Ian Pilcher arequipeno@xxxxxxxxx -------- "I grew up before Mark Zuckerberg invented friendship" -------- ======================================================================== -- 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