linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: "Mats Kärrman" <Mats.Karrman@tritech.se>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: [PATCH v2] mtd-utils: integck: add support for volume specific power-cut test
Date: Tue, 27 May 2014 17:55:45 +0300	[thread overview]
Message-ID: <1401202545.1304.164.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <ED3E0BCACD909541BA94A34C4A164D4C5B4091B2@post.tritech.se>

On Tue, 2014-05-27 at 14:15 +0000, Mats Kärrman wrote:
> Artem, 
> 
> On Tuesday, May 27, 2014 2:37 PM, Artem Bityutskiy wrote:
> > But I think I see the problem with this solution now.
> >
> > The problem is that with this we won't get power cut emulated while you
> > mount the file system.
> >
> > Before this change, we could have something like:
> >
> > 1. Working with the FS, power-cut
> > 2. Unmount the FS, start mounting -> power-cut in the middle of mount.
> > 
> > So we could test power cuts while we are in the middle of recovery from
> > the previous power cuts, in a way "nested" power-cuts.
> > 
> > With your change, we never have them.
> 
> With the old version we didn't get a power-cut at all, unless power-cuts
> were first globally enable by writing "1" to 
> /sys/kernel/debug/ubifs/tst_recovery.
> 
> This is still possible!

Ah, yes, it is enabled _outside_ of the test. And with this patch, the
per-FS one is enabled _inside_ the test.

With this patch we have the following issues:

1. -p enables per-FS power cut emulation automatically, however, you
have bad coverage (the most problematic code in the UBIFS driver is
related to the "nested" cuts, IIRC)

2. For better coverage, you have to to manually enable global power
cuts.

So, those who test UBIFS with nandsim, may mistakenly think -p is all
they need, and they miss a fair amount of coverage. Not good.

And we have an inconsistency: the test is able to touch the per-FS power
cuts debugfs files, which is nice and user-friendly, but the global
power cuts debugfs file has to be touched manually. Not nice.


How about this compromise solution which should be simple enough to
implement, but I am not sure it is good enough to you.


Change -p so that it takes an _argument_. The argument should be a path
to the debugfs file which controls the power cuts emulation. This can be
either global or the per-FS switch.

All the test will do is writing '1' to this file as soon as it starts,
and as soon as it mounts or re-mounts the FS.

Now, it is your choice which file path to give - the global or the
per-FS.

What do you think?

-- 
Best Regards,
Artem Bityutskiy

  reply	other threads:[~2014-05-27 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15  8:21 [PATCH v2] mtd-utils: integck: add support for volume specific power-cut test Mats Kärrman
2014-05-27 12:37 ` Artem Bityutskiy
2014-05-27 14:15   ` Mats Kärrman
2014-05-27 14:55     ` Artem Bityutskiy [this message]
2014-05-28  8:40       ` Mats Kärrman
2014-05-28  9:30         ` Artem Bityutskiy
2014-05-28 10:52           ` Mats Kärrman
2014-05-28 11:04             ` Artem Bityutskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401202545.1304.164.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=Mats.Karrman@tritech.se \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).