public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Chandan Babu R <chandan.babu@oracle.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	Dave Chinner <dchinner@redhat.com>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 6/9] xfs: only free posteof blocks on first close
Date: Sun, 11 Aug 2024 10:44:47 +0200	[thread overview]
Message-ID: <20240811084447.GA12713@lst.de> (raw)
In-Reply-To: <ZrVIcay+jnfM7mM5@dread.disaster.area>

On Fri, Aug 09, 2024 at 08:36:33AM +1000, Dave Chinner wrote:
> > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> > index 60424e64230743..30b553ac8f56bb 100644
> > --- a/fs/xfs/xfs_file.c
> > +++ b/fs/xfs/xfs_file.c
> > @@ -1204,15 +1204,21 @@ xfs_file_release(
> >  	 * exposed to that problem.
> >  	 */
> >  	if (xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED)) {
> > -		xfs_iflags_clear(ip, XFS_IDIRTY_RELEASE);
> > +		xfs_iflags_clear(ip, XFS_EOFBLOCKS_RELEASED);
> >  		if (ip->i_delayed_blks > 0)
> >  			filemap_flush(inode->i_mapping);
> >  	}
> 
> This should probably be open coded to minimise lock cycles and lock
> contention on the flags lock when concurrent open/sync write/close 
> cycles are run on the file (as recently reported by Mateusz). i.e:

Let's do that as a separate patch on top of the series, as that
is unrelated.


  reply	other threads:[~2024-08-11  8:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 15:27 post-EOF block handling revamp v2 Christoph Hellwig
2024-08-08 15:27 ` [PATCH 1/9] xfs: remove the i_mode check in xfs_release Christoph Hellwig
2024-08-08 15:27 ` [PATCH 2/9] xfs: refactor f_op->release handling Christoph Hellwig
2024-08-08 15:27 ` [PATCH 3/9] xfs: don't bother returning errors from xfs_file_release Christoph Hellwig
2024-08-08 15:27 ` [PATCH 4/9] xfs: skip all of xfs_file_release when shut down Christoph Hellwig
2024-08-08 22:25   ` Dave Chinner
2024-08-08 15:27 ` [PATCH 5/9] xfs: don't free post-EOF blocks on read close Christoph Hellwig
2024-08-08 15:27 ` [PATCH 6/9] xfs: only free posteof blocks on first close Christoph Hellwig
2024-08-08 22:36   ` Dave Chinner
2024-08-11  8:44     ` Christoph Hellwig [this message]
2024-08-08 15:27 ` [PATCH 7/9] xfs: check XFS_EOFBLOCKS_RELEASED earlier in xfs_release_eofblocks Christoph Hellwig
2024-08-08 23:03   ` Dave Chinner
2024-08-11  8:59     ` Christoph Hellwig
2024-08-11 23:48       ` Dave Chinner
2024-08-08 15:27 ` [PATCH 8/9] xfs: simplify extent lookup in xfs_can_free_eofblocks Christoph Hellwig
2024-08-08 15:27 ` [PATCH 9/9] xfs: reclaim speculative preallocations for append only files Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2024-08-13  7:39 post-EOF block handling revamp v3 Christoph Hellwig
2024-08-13  7:39 ` [PATCH 6/9] xfs: only free posteof blocks on first close Christoph Hellwig

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=20240811084447.GA12713@lst.de \
    --to=hch@lst.de \
    --cc=chandan.babu@oracle.com \
    --cc=david@fromorbit.com \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --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