public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Brian Foster <bfoster@redhat.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH v2 1/3] xfs: add scan owner field to xfs_eofblocks
Date: Tue, 27 May 2014 22:30:19 -0700	[thread overview]
Message-ID: <20140528053019.GB3816@infradead.org> (raw)
In-Reply-To: <20140527212653.GC6677@dastard>

On Wed, May 28, 2014 at 07:26:53AM +1000, Dave Chinner wrote:
> > Right... maybe I'm not parsing your point. The purpose here is to avoid
> > the trylock entirely. E.g., Indicate that we have already acquired the
> > lock and can proceed with xfs_free_eofblocks(), rather than fail a
> > trylock and skip (which appears to be a potential infinite loop scenario
> > here due to how the AG walking code handles EAGAIN).
> 
> I think Christoph's concern here is that we are calling a function
> that can take the iolock while we already hold the iolock. i.e. the
> reason we have to add the anti-deadlock code in the first place.

Indeed.

> To
> address that, can we restructure xfs_file_buffered_aio_write() such
> that the ENOSPC/EDQUOT flush is done outside the iolock?
> 
> >From a quick check, I don't think there is any problem with dropping
> the iolock, doing the flushes and then going all the way back to the
> start of the function again, but closer examination and testing is
> warranted...

I think we'd need some form of early space reservation, otherwise we'd
get non-atomic writes.  Time to get those batches write patches out
again..

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-05-28  5:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23 11:52 [PATCH v2 0/3] xfs: run eofblocks scan on ENOSPC Brian Foster
2014-05-23 11:52 ` [PATCH v2 1/3] xfs: add scan owner field to xfs_eofblocks Brian Foster
2014-05-26 22:49   ` Dave Chinner
2014-05-27 10:44   ` Christoph Hellwig
2014-05-27 12:18     ` Brian Foster
2014-05-27 21:26       ` Dave Chinner
2014-05-28  5:30         ` Christoph Hellwig [this message]
2014-05-28 14:00           ` Brian Foster
2014-05-23 11:52 ` [PATCH v2 2/3] xfs: run an eofblocks scan on ENOSPC/EDQUOT Brian Foster
2014-05-26 22:57   ` Dave Chinner
2014-05-27 12:47     ` Brian Foster
2014-05-27 21:14       ` Dave Chinner
2014-05-28 12:42         ` Brian Foster
2014-05-23 11:52 ` [PATCH v2 3/3] xfs: squash prealloc while over quota free space as well Brian Foster
2014-05-26 23:00   ` 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=20140528053019.GB3816@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=xfs@oss.sgi.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox