From: Christoph Hellwig <hch@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: reflink should force the log out if mounted with wsync
Date: Thu, 2 Apr 2020 01:49:30 -0700 [thread overview]
Message-ID: <20200402084930.GA26523@infradead.org> (raw)
In-Reply-To: <20200402075108.GB17191@infradead.org>
On Thu, Apr 02, 2020 at 12:51:08AM -0700, Christoph Hellwig wrote:
> On Wed, Apr 01, 2020 at 09:17:05PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Reflink should force the log out to disk if the filesystem was mounted
> > with wsync, the same as most other operations in xfs.
>
> Looks reasonable. That being said I really hate the way we handle
> this - I've been wanting to rework the wsync/dirsync code to just mark
> as transaction as dirsync or wsync and then let xfs_trans_commit handle
> checking if the file system is mounted with the option to clean this
> mess up. Let me see if I could resurrect that quickly.
Resurrected and under testing now. While forward porting your patch
I noticed it could be much simpler even without the refactor by just
using xfs_trans_set_sync. The downside of that is that the log force
is under the inode locks, but so are the log forces for all other wysnc
induced log forces. So I think you should just submit this in the
simplified version matching the rest of the wsync users as a fix. If
we want to optimize it later on that should be done as a separate patch
and for all wsync/dirsync users.
next prev parent reply other threads:[~2020-04-02 8:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-02 4:17 [PATCH] xfs: reflink should force the log out if mounted with wsync Darrick J. Wong
2020-04-02 7:51 ` Christoph Hellwig
2020-04-02 8:49 ` Christoph Hellwig [this message]
2020-04-02 14:53 ` Darrick J. Wong
2020-04-02 14:56 ` Christoph Hellwig
2020-04-02 15:14 ` Darrick J. Wong
2020-04-02 15:20 ` Christoph Hellwig
2020-04-02 21:55 ` 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=20200402084930.GA26523@infradead.org \
--to=hch@infradead.org \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox