Created attachment 25745 [details] Move initialization of virtio stuff before the initialization of mtd, so that block2mtd can be used on virtio-based block devices. Whenever I try to use a virtio based block device as an MTD device with the block2mtd driver, I get the following error: block2mtd: error: cannot open device /dev/vda2 Since both virtio_blk and block2mtd are builtin into the kernel, I cannot solve this with changing the load order of the modules. The cause of this problem is that some virtio_* stuff, on which virtio_blk depends, is only initialized after block2mtd. When checking drivers/Makefile, it seems that virtio itself is almost at the bottom, way below stuff like block and others. I was able to solve my problem by having virtio initialized around the time the Xen stuff is initialized, before block and others. And it shouldn't hurt to have virtio related stuff available earlier during boot either.
Created attachment 25746 [details] Move initialization of virtio stuff before the initialization of mtd, so that block2mtd can be used on virtio-based block devices. This patch does the same as the previous one, but was made with git and is signed-off.
Please don't send patches via bugzilla - it causes lots of problems with our usual patch management and review processes. Please send this patch via email as per Documentation/SubmittingPatches. Suitable recipients may be found via scripts/get_maintainer.pl. Please also cc myself on the email. Thanks.
Done.