From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Tue, 20 Feb 2018 10:32:39 -0500 (EST) Subject: [Cluster-devel] [PATCH] gfs2: Fsync parent directories In-Reply-To: <20180219232201.18355-1-agruenba@redhat.com> References: <20180219232201.18355-1-agruenba@redhat.com> Message-ID: <461549016.4801736.1519140759614.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 | --- 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