All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Bo Branten <bosse@acc.umu.se>
Cc: linux-ext4@vger.kernel.org
Subject: Re: A question on umounting without flushing journal
Date: Tue, 3 Mar 2020 12:30:38 -0500	[thread overview]
Message-ID: <20200303173038.GC61444@mit.edu> (raw)
In-Reply-To: <alpine.DEB.2.21.2003031120390.949380@stalin.acc.umu.se>

On Tue, Mar 03, 2020 at 11:26:13AM +0100, Bo Branten wrote:
> 
> now I have another question on how to test the ext4 driver we implement for
> another os: At mount time the driver should check the journal and use jbd2
> to replay if there is anything left in it and I would like to ask if there
> is any other methods to do an unclean umount in linux besides pressing
> reset? I would like to leave a lot of records in the journal that our driver
> can try to process?

The standard way to do this in xfstests is using the dm-flakey
device-mapper device.  We set it up so that all reads and writes are
passed through, and then we start some workload such as fsstress, and
then we reconfigure dm-flakey to drop 100% of all write requests to
the underlying block device.

We then kill the workload, and unmount the file system, and then we
reset the dm-flakey device to pass through 100% of all writes.  This
simulates quite accurately what the block device would look like after
a sudden power failure, but it doesn't require a power-fail rack
(without shortening the lives of the equipment; dropping power tends
to put a lot stress on the hardware).

Cheers,

					- Ted

      reply	other threads:[~2020-03-03 17:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03 10:26 A question on umounting without flushing journal Bo Branten
2020-03-03 17:30 ` Theodore Y. Ts'o [this message]

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=20200303173038.GC61444@mit.edu \
    --to=tytso@mit.edu \
    --cc=bosse@acc.umu.se \
    --cc=linux-ext4@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.