From: Brian Foster <bfoster@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
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 14:54:12 -0400 [thread overview]
Message-ID: <20200518185412.GA19081@bfoster> (raw)
In-Reply-To: <20200518170112.GB18061@infradead.org>
On Mon, May 18, 2020 at 10:01:12AM -0700, Christoph Hellwig wrote:
> 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.
>
Sure, that's why I was suggesting to check the quota for low free space
conditions. One one hand, a quota scan might be worth it under low quota
space conditions to avoid the heavy handed impact (i.e. flush
everything) on an fs that otherwise might have plenty of free space.
OTOH, it might be pointless if permanent -ENOSPC (due to project quota)
is imminent and we always fall back to the global scan.
Brian
prev parent reply other threads:[~2020-05-18 18:54 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
2020-05-18 18:54 ` Brian Foster [this message]
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=20200518185412.GA19081@bfoster \
--to=bfoster@redhat.com \
--cc=hch@infradead.org \
--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