disk plugin: ignore loop devices#678
disk plugin: ignore loop devices#678panlinux wants to merge 1 commit intoredhat-performance:masterfrom
Conversation
63a36f4 to
20fd4f1
Compare
It doesn't make sense to apply tuning parameters to loop devices, since they point at files that live in other block devices, also subject to tuning. Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
20fd4f1 to
afbfb7d
Compare
|
Thanks to Athos Ribeiro, here is a much simpler version that I force-pushed. |
|
Thanks. I think the change makes sense, but I am afraid it will break several Beaker functionality tests that use loop devices to safely test disk plugin features. That's why I would prefer it to be configurable, e.g. in I think the loopdev can be detected if the device has the udev |
Or per plugin configuration when the #626 is merged. |
It doesn't make sense to apply tuning parameters to loop devices, since they point at files that live in other block devices, also subject to tuning.
I checked the
devicestructure looking for a telltale of a loop device. I thought that theloop/backing_fileattribute would be a good choice, but I had some that had no such attribute. I could also inspect the name of the device, and assume "loop*" is a loop device. I ended up picking the major number, 7, and was a bit annoyed that there was no straight attribute with that number, so there is some ugly parsing of thedevattribute.Let's use this PR to plant the idea of ignoring loop devices. If that sounds ok and I didn't miss a use case where we want loop devices, we can iterate over the best way to do it.
Thanks!