[PATCH 2/2] mtd-utils: integck: add support for volume specific power-cut test

Mats Kärrman Mats.Karrman at tritech.se
Tue Apr 15 08:07:16 PDT 2014


Hi Artem,

Ehhhh.... I think either you have confused things a bit or I totally misunderstand you.

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).
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).
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.

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)"
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).

BR // Mats

________________________________________
From: Artem Bityutskiy [dedekind1 at gmail.com]
Sent: Tuesday, April 15, 2014 3:12 PM
To: Mats Kärrman
Cc: linux-mtd at lists.infradead.org
Subject: Re: [PATCH 2/2] mtd-utils: integck: add support for volume specific power-cut test

Hi Mats,

pushed the first patch out, thanks.

On Mon, 2014-04-14 at 11:47 +0000, Mats Kärrman wrote:
> -"continues forever.\n";
> +"continues forever.\n"
> +"Whereas -p requires power cut emulation to be enabled globally, the -P option\n"
> +"automatically enables the use of power cut emulation on the tested fs instance\n"
> +"only (currently implemented for UBIFS only).\n";

Could we please invent an easy to understand way of naming this and the
option.

So essentially, this is about emulating power cuts at UBI and UBIFS
levels. The "reenabling" thing is a small details which should not be
visible in --help, because it is confusing anyway.

I'd suggest to split this patch on 2. First patch renames the option to
'--ubi-power-cut', refines help message, may be some comments and
function names, if needed.

The second patch introduces '--ubifs-power-cut', and explains that this
makes sure that power cuts happen in the UBIFS driver, versus the
underlying UBI driver.

Thanks!

--
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list