en en en en en en ceb yue en en en en mk en hbs_lat en en en en es de en en en en en en en en en en en en de de en en en en en en en de en ja en en de en en en pt en en en en en en en en en en en en en en en en en en it en en en en en en ceb yue en en en en mk en hbs_lat
Kernel.org Bugzilla – Bug 15644 block2mtd can not use virtio based block device (virtio_blk) Last modified: 2012-07-05 16:35:45 UTC
2010-03-29 01:20 UTC by Stijn Tintel
2012-07-05 16:35 UTC (History)
Move initialization of virtio stuff before the initialization of mtd, so that block2mtd can be used on virtio-based block devices. (722 bytes, patch)
2010-03-29 01:20 UTC, Stijn Tintel
Move initialization of virtio stuff before the initialization of mtd, so that block2mtd can be used on virtio-based block devices. (1000 bytes, patch)
2010-03-29 01:50 UTC, Stijn Tintel
Show Obsolete (1) Add an attachment (proposed patch, testcase, etc.)
Description Stijn Tintel 2010-03-29 01:20:36 UTC
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.
Comment 1 Stijn Tintel 2010-03-29 01:50:07 UTC
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.
Comment 2 Andrew Morton 2010-04-13 20:36:02 UTC
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.