Re: (2) [PATCH] xfs: make pNFS LAYOUTCOMMIT stable the way fdatasync does

From: Christoph Hellwig

Date: Wed Oct 14 2026 - 09:19:15 EST


On Wed, Oct 14, 2026 at 10:40:56AM +0900, Daejun Park wrote:
> On Tue, Oct 13, 2026 at 02:08:46PM +0200, Christoph Hellwig wrote:
> > That feels like a bit of overkill, given that the shared code is
> > just two function calls.
>
> OK, no helper then.
>
> > ... but maybe this helper should move to xfs_log.c and renamed to
> > something like xfs_log_force_inode?
>
> Makes sense now that it is used outside xfs_file.c. There already is an
> xfs_log_force_inode() in xfs_inode.c, which is the !datasync case of
> this one, so in v2 I'll move xfs_fsync_flush_log() next to it and make
> xfs_log_force_inode() a wrapper around it.

Oh, I should have thought of xfs_log_force_inode as I added it.
I think adding the datasync argument to it is probably the best idea.