All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Filipe Manana <fdmanana@kernel.org>,
	fstests <fstests@vger.kernel.org>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>,
	Filipe Manana <fdmanana@suse.com>
Subject: Re: [PATCH] generic: add test for fsync after shrinking truncate and rename
Date: Thu, 7 Mar 2019 08:48:13 +1100	[thread overview]
Message-ID: <20190306214813.GE26298@dastard> (raw)
In-Reply-To: <CAOQ4uxggon==2r2hibMvXc4_N4zod+2z0Ycw74eKRn+q1uwYsw@mail.gmail.com>

On Wed, Mar 06, 2019 at 09:51:23AM +0200, Amir Goldstein wrote:
> On Wed, Mar 6, 2019 at 12:33 AM Dave Chinner <david@fromorbit.com> wrote:
> > > So the reason this is working is because 2nd fsync needs to
> > > persist ctime of B and not because it needs to persist the
> > > truncate.
> >
> > ctime modifications during rename are irrelevent because there's no
> > fsync between the truncate and the rename so the file inode is
> > already dirty due to the truncate. I think you've got the wrong end
> > of the stick here, Amir. :)
> 
> Doh! The discussion is still interesting because people have
> hard time to understand that those hidden details like ctime
> update on rename may have different behavior on different fs
> regardless if they obay ordered metadata or not.
> Btrfs is different in the respect of metadata dependencies from
> xfs/ext4 in many ways as seen in the different rename/link
> crash consistency discussions.

Yes, little things like can result in different behaviour, but what
we are trying to do is get to the point where there is minimal
difference between all crash-recovery-capable linux filesystems.

e.g. what we see here is that by always including the inode being
moved in the rename transaction (regardless of how a filesystem
acheives that), we provide consistent, reliable, predictable
behaviour in all cases of "fsync after rename". IOWs, the SOMC model
that _require_metadata_journaling tests are supposed to conform to
is far more strict that POSIX requires and our tests need to reflect
this stricter consistency model.

IOWs, we should be encoding the behaviour we want in these tests
rather than implementing yet another "test POSIX compatible
behaviour" - POSIX is a complete crapshoot when it comes to
persistence requirements. And if a filesystem fails a SOMC-model
test, then the filesystem needs to be fixed, not have the test
"relaxed" to only exercise POSIX-defined behaviour.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2019-03-06 21:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 14:06 [PATCH] generic: add test for fsync after shrinking truncate and rename fdmanana
2019-03-04 15:04 ` Amir Goldstein
2019-03-04 15:23   ` Filipe Manana
2019-03-04 17:59     ` Amir Goldstein
2019-03-04 22:30       ` Filipe Manana
2019-03-05  5:59         ` Amir Goldstein
2019-03-05  9:26           ` Filipe Manana
2019-03-05 10:51             ` Amir Goldstein
2019-03-05  0:50   ` Dave Chinner
2019-03-05  1:00     ` Dave Chinner
2019-03-05  1:08       ` Vijay Chidambaram
2019-03-05  5:39     ` Amir Goldstein
2019-03-05 22:33       ` Dave Chinner
2019-03-06  7:51         ` Amir Goldstein
2019-03-06 21:48           ` Dave Chinner [this message]
2019-03-07  7:52             ` Amir Goldstein
2019-03-07 23:19               ` Jayashree Mohan
2019-03-08  4:35                 ` Dave Chinner
2019-03-08 15:11                   ` Vijay Chidambaram
2019-03-19  1:13                     ` Dave Chinner
2019-03-08  3:46               ` Dave Chinner
2019-03-05  9:26 ` [PATCH v2] " fdmanana

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=20190306214813.GE26298@dastard \
    --to=david@fromorbit.com \
    --cc=amir73il@gmail.com \
    --cc=fdmanana@kernel.org \
    --cc=fdmanana@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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.