[RFC] mtd-utils: integck: add support for volume specific power-cut test

Mats Kärrman Mats.Karrman at tritech.se
Mon Aug 19 11:01:42 EDT 2013


On Mon, 2013-08-19 at 17:55 +0300, Artem Bityutskiy wrote:
> On Mon, 2013-08-19 at 17:50 +0300, Artem Bityutskiy wrote:
> > On Mon, 2013-08-19 at 14:24 +0000, Mats Kärrman wrote:
> > > # echo "1" > /sys/kernel/debug/ubifs/ubi1_0/tst_recovery
> > >
> > > However, in the latter case, the flag is reset when the file system is
> > > remounted
> > > so the test continues without tst_recovery enabled.
> >
> > Ah, I see it now.
> >
> > Did you try if you can resolve the mount path into 'ubiX_Y' in integck,
> > so that one wouldn't need to pass this -P <loong/path/string> option?
> 
> Check the recover_tested_fs() which uses get_tested_fs_mntent() which
> parses /proc/mounts. Can you do a similar thing and find the 'ubiX_Y'
> part, and then just write 1 to the sysfs path. -P would not be needed
> then at all.
> 

Actually this was what I first had in mind, but I stopped for the -P solution
for two reasons:
1) It saved me a lot of time ;)
2) Integck seem to be written with the aim of being a general purpose test
program (even if some comments in the code hint in another direction). If
so, it would not be safe to assume there is any ubifs/ubi folder or that the
knob file is called tst_recovery. Also it is possible to mount the debugfs
anywhere (but i guess that could also be parsed from /proc/mounts).

So: general or ubifs specific?

BR // Mats



More information about the linux-mtd mailing list