All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] gfs2: Fsync parent directories
Date: Tue, 20 Feb 2018 10:32:39 -0500 (EST)	[thread overview]
Message-ID: <461549016.4801736.1519140759614.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20180219232201.18355-1-agruenba@redhat.com>

Hi Andreas,

----- Original Message -----
| When fsyncing a new file, also fsync the directory the files is in,
| recursively.  This is how Linux filesystems should behave nowadays,
| even if not mandated by POSIX.
| 
| Based on ext4 commits 14ece1028, d59729f4e, and 9f713878f.
| 
| Fixes xfstests generic/322, generic/376.
| 
| Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
| ---

It seems like the patch should be calling gfs2_inode_lookup on the
parent directory or something, rather than a simple i_grab, and
possibly even holding (nw) the parent directory's i_gl glock.
Otherwise, the call to gfs2_ail_flush may reference an i_gl that
might not exist. I'm concerned about other nodes in the cluster
referencing and/or changing the parent directory inode while this
is happening. I'm not sure if it's possible. Maybe Nate has a test
to check cluster coherency for directories as well as files?

Regards,

Bob Peterson
Red Hat File Systems



  reply	other threads:[~2018-02-20 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 23:22 [Cluster-devel] [PATCH] gfs2: Fsync parent directories Andreas Gruenbacher
2018-02-20 15:32 ` Bob Peterson [this message]
2018-02-20 19:46 ` Christoph Hellwig
2018-02-20 20:53   ` Andreas Gruenbacher
2018-02-20 21:51     ` Dave Chinner
2018-02-21 16:11       ` Christoph Hellwig
2018-02-26 17:17         ` Andreas Gruenbacher

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=461549016.4801736.1519140759614.JavaMail.zimbra@redhat.com \
    --to=rpeterso@redhat.com \
    /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.