linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Chen Rong <rongx.a.chen@intel.com>,
	fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	philip.li@intel.com
Subject: Re: xfstests: generic/342 run failed in f2fs
Date: Mon, 25 Dec 2017 11:31:02 -0500	[thread overview]
Message-ID: <20171225163102.GB14399@thunk.org> (raw)
In-Reply-To: <d5ff659d-c659-ca47-3999-2f4b16629e42@sandeen.net>

On Sun, Dec 24, 2017 at 11:47:20PM -0800, Eric Sandeen wrote:
> Filesystems are free to do /more/ than the minimum required by posix -
> see ext4_sync_parent for example.  Or xfs_finish_rename, for synchronous
> mounts:
> 
>          * If this is a synchronous mount, make sure that the rename transaction
>          * goes to disk before returning to the user.
>          */
>         if (tp->t_mountp->m_flags & (XFS_MOUNT_WSYNC|XFS_MOUNT_DIRSYNC))
>                 xfs_trans_set_sync(tp);
> 
> so behavior can be fs-dependent, or mount option dependent, etc.
> 
> But to be portable, if an app wants directory changes to be persistent
> before proceeding, it must fsync the directory after making changes.
> 
> I don't know about f2fs's design intent, whether it guarantees more
> than posix requires, but to guarantee that this test works on any posix
> fs, I think that directory fsync is needed.

Agreed that this is a test bug, and we should add the fsync to the
parent directory.

It might also be a good idea for f2fs to do more, given that fsync is
a slow enough operation that so long as you can make sure the fsync of
the parent directory happens within the same atomic update as the
child inode, you might as well give the more expansive guarantee.  But
obviously that's up to the f2fs developers to decide whether they want
to do that work.

Cheers,

      	     	       	       	    - Ted

  reply	other threads:[~2017-12-25 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-25  5:28 xfstests: generic/342 run failed in f2fs Chen Rong
2017-12-25  5:56 ` Eric Sandeen
2017-12-25  6:30   ` Chen Rong
2017-12-25  7:47     ` Eric Sandeen
2017-12-25 16:31       ` Theodore Ts'o [this message]
2017-12-27 19:11         ` Jaegeuk Kim
2017-12-28  3:17           ` Chao Yu
2017-12-28  3:41             ` Theodore Ts'o
2017-12-28  9:09           ` Dave Chinner
2017-12-28 16:29             ` Jaegeuk Kim
2017-12-28 16:59             ` Eric Sandeen
2017-12-28 21:21               ` Dave Chinner

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=20171225163102.GB14399@thunk.org \
    --to=tytso@mit.edu \
    --cc=fstests@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=philip.li@intel.com \
    --cc=rongx.a.chen@intel.com \
    --cc=sandeen@sandeen.net \
    /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).