Linux-XFS Archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, chandanbabu@kernel.org
Subject: Re: [PATCH 3/4] xfs: handle allocation failure in xfs_dquot_disk_alloc()
Date: Wed, 3 Apr 2024 17:41:35 +1100	[thread overview]
Message-ID: <Zgz6H7tXehgxOfYC@dread.disaster.area> (raw)
In-Reply-To: <20240403050430.GT6390@frogsfrogsfrogs>

On Tue, Apr 02, 2024 at 10:04:30PM -0700, Darrick J. Wong wrote:
> On Tue, Apr 02, 2024 at 09:56:24PM -0700, Christoph Hellwig wrote:
> > On Tue, Apr 02, 2024 at 09:54:56PM -0700, Darrick J. Wong wrote:
> > > Usually this will result in the file write erroring out, right?
> > 
> > quota file allocations usually come originally from a file write or
> > inode creation.  But I'm not entirely sure if that was the question..
> 
> Heh, and the question was based on a misreading of your comment. 8-)
> 
> AFAICT this can result in dqattach erroring out, which seems mostly
> benign.

Right - this propagates the ENOSPC error back to the caller without
a shutdown being required. If we get a corruption detected, then
the allocation will return an error, not nmaps == 0. That error will
cause a corruption. But an unexpected allocation failure right at
ENOSPC can occur without there being corruption because of, say, one
of the many, many near ENOSPC accounting bugs we've had to fix
over the past 20 years, and if the allocation fails we should just
clean up and return -ENOSPC without shutting down the filesystem.
We're right at ENOSPC, so there's every chance that the next
operation after the dquot was attached would fail with ENOSPC
anyway....

So, yeah, I don't see any reason to shut the filesytsem down because
we ended up with a transient ENOSPC error or an off-by one in the
free space accounting somewhere...

-Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2024-04-03  6:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 21:38 [PATCH 0/4] xfs: fixes for 6.9-rcX Dave Chinner
2024-04-02 21:38 ` [PATCH 1/4] xfs: use kvmalloc for xattr buffers Dave Chinner
2024-04-03  3:43   ` Darrick J. Wong
2024-04-03  4:39   ` Christoph Hellwig
2024-04-03  6:16     ` Dave Chinner
2024-04-03  6:19       ` Christoph Hellwig
2024-04-17 14:35   ` Pankaj Raghav (Samsung)
2024-04-02 21:38 ` [PATCH 2/4] xfs: xfs_alloc_file_space() fails to detect ENOSPC Dave Chinner
2024-04-03  3:46   ` Darrick J. Wong
2024-04-03  4:40   ` Christoph Hellwig
2024-04-03  6:34     ` Dave Chinner
2024-04-03 18:23       ` Christoph Hellwig
2024-04-02 21:38 ` [PATCH 3/4] xfs: handle allocation failure in xfs_dquot_disk_alloc() Dave Chinner
2024-04-03  3:48   ` Darrick J. Wong
2024-04-03  4:41   ` Christoph Hellwig
2024-04-03  4:54     ` Darrick J. Wong
2024-04-03  4:56       ` Christoph Hellwig
2024-04-03  5:04         ` Darrick J. Wong
2024-04-03  6:41           ` Dave Chinner [this message]
2024-04-03 14:06   ` Christoph Hellwig
2024-04-03 21:49     ` Dave Chinner
2024-04-02 21:38 ` [PATCH 4/4] xfs: validate block count for XFS_IOC_SET_RESBLKS Dave Chinner
2024-04-03  3:53   ` Darrick J. Wong
2024-04-03  6:55     ` Dave Chinner
2024-04-03  4:43   ` 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=Zgz6H7tXehgxOfYC@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=chandanbabu@kernel.org \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).