[PATCH 2/2] mtd-utils: integck: add support for volume specific power-cut test
Mats.Karrman at tritech.se
Tue May 13 05:59:40 PDT 2014
On Sent: Tuesday, May 13, 2014 1:00 PM, Artem Bityutskiy wrote:
> On Tue, 2014-04-15 at 15:07 +0000, Mats Kärrman wrote:
>> Both the "-p" and the "-P" options enable UBIFS power-cut tests. AfaIk there is no such thing for UBI (?).
>> My problem is that I like to run the tests on my target platform that uses UBIFS as root FS.
>> If I enable "power-cut" emulation globally (i.e. echo 1 > /sys/kernel/debug/ubifs/tst_recovery) this will
>> enable "power-cuts" not only for the tested partition (good) but also for my root fs (bad).
> OK, thanks for explaining.
>> UBIFS gives the opportunity to also enable "power-cuts" for a specific UBI volume (e.g.
>> echo 1 > /sys/kernel/debug/ubifs/ubi1_0/tst_recovery) but this only works until the UBI partition
>> is reattached (the flag is initialized to 0).
> Why wouldn't we have this to be the default, and the only way?
I assume we're still talking about changing integck and not about changing the UBIFS linux
kernel driver ability to enable power-cuts globally.
>> What "-P" does differently from "-p" is that it re-enables the power-cut emulation for the used
>> partition before continuing the test after a remount.
> Do we really need 2 options for this test? May be we can just use per-FS
> knob in the old option?
Perhaps I'm overly concerned about backwards compatibility...
Also I was uncertain about if it may be relevant whether power-cut emulation is enabled
during the remount but I guess that in that case it is still possible to have power-cuts
>> It seems that the help-text of integck suggests that the power-cut test mode is available for
>> any filesystem that is "able to emulate power-cuts" so the "(currently implemented for UBIFS only)"
> Well, this was probably a mistake to add this comment, feel free to kill
> it. This is ubifs-specific.
>> is there because this is the only fs integck is (currently) able to reenable emulation for. ("-p"
>> requires emulation to be enabled before launching integck which took me a while to figure out
>> so this should perhaps also be written in the help text).
> You are always welcome with a patch :-)
So, what you're suggesting is that we should change integck so that:
a) it has only one power-cut emulation switch: -p
b) this switch should enable (and re-enable) power-cut emulation per fs instance (always).
BR // mats
More information about the linux-mtd