public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Brian Foster <bfoster@redhat.com>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH, RFCRAP] xfs: handle ENOSPC quota return in xfs_file_buffered_aio_write
Date: Mon, 18 May 2020 10:01:12 -0700	[thread overview]
Message-ID: <20200518170112.GB18061@infradead.org> (raw)
In-Reply-To: <20200518123454.GB10938@bfoster>

On Mon, May 18, 2020 at 08:34:54AM -0400, Brian Foster wrote:
> Christoph's comment aside, note that the quota helpers here are filtered
> scans based on the dquots attached to the inode. It's basically an
> optimized scan when we know the failure was due to quota, so I don't
> think there should ever be a need to run a quota scan after running the
> -ENOSPC handling above. For project quota, it might make more sense to
> check if a pdquot is attached, check xfs_dquot_lowsp() and conditionally
> update the eofb to do a filtered pquota scan if appropriate (since
> calling the quota helper above would also affect other dquots attached
> to the inode, which I don't think we want to do). Then we can fall back
> to the global scan if the pquota optimization is not relevant or still
> returns -ENOSPC on the subsequent retry.

That's what I've implemented.  But it turns out -ENOSPC can of course
still mean a real -ENOSPC even with project quotas attached.  So back
to the drawing board - I think I basically need to replace the enospc
with a tristate saying what kind of scan we've tried.  Or we just ignore
the issue and keep the current global scan after a potential project
quota -ENOSPC, because all that cruft isn't worth it after all.

  reply	other threads:[~2020-05-18 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 21:43 [PATCH, RFCRAP] xfs: handle ENOSPC quota return in xfs_file_buffered_aio_write Eric Sandeen
2020-05-17  9:58 ` Christoph Hellwig
2020-05-18 12:34 ` Brian Foster
2020-05-18 17:01   ` Christoph Hellwig [this message]
2020-05-18 18:54     ` Brian Foster

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=20200518170112.GB18061@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@redhat.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