public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <esandeen@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>, sandeen@sandeen.net
Cc: linux-xfs@vger.kernel.org, allison.henderson@oracle.com
Subject: Re: [PATCH 2/5] mkfs: don't let internal logs consume more than 95% of an AG
Date: Wed, 16 Mar 2022 13:50:35 -0500	[thread overview]
Message-ID: <822cdfdc-358f-669e-d2db-31745643d614@redhat.com> (raw)
In-Reply-To: <164738661360.3191861.16773208450465120679.stgit@magnolia>

On 3/15/22 6:23 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Currently, we don't let an internal log consume every last block in an
> AG.  According to the comment, we're doing this to avoid tripping AGF
> verifiers if freeblks==0, but on a modern filesystem this isn't
> sufficient to avoid problems.  First, the per-AG reservations for
> reflink and rmap claim up to about 1.7% of each AG for btree expansion,

Hm, will that be a factor if the log consumes every last block in that
AG? Or is the problem that if we consume "most" blocks, that leaves the
possibility of reflink/rmap btree expansion subsequently failing because
we do have a little room for new allocations in that AG?

Or is it a problem right out of the gate because the per-ag reservations
collide with a maximal log before the filesystem is even in use?

> and secondly, we need to have enough space in the AG to allocate the
> root inode chunk, if it should be the case that the log ends up in AG 0.
> We don't care about nonredundant (i.e. agcount==1) filesystems, but it
> can also happen if the user passes in -lagnum=0.
> 
> Change this constraint so that we can't leave less than 5% free space
> after allocating the log.  This is perhaps a bit much, but as we're
> about to disallow tiny filesystems anyway, it seems unlikely to cause
> problems with scenarios that we care about.

This is only modifying the case where we automatically calculated a
log size, and doesn't affect a manually-specified size. Is that
intentional? (I guess we already had this discrepancy, whether it was
the old "-1" heuristic or the new "95%" heuristic...

But 5% is likely to be a fair bit bigger than 1 block, so I'm wondering
if the manually-specified case needs to be limited as well.

Thanks,
-Eric


  reply	other threads:[~2022-03-16 18:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 23:23 [PATCHSET 0/5] xfsprogs: stop allowing tiny filesystems Darrick J. Wong
2022-03-15 23:23 ` [PATCH 1/5] mkfs: hoist the internal log size clamp code Darrick J. Wong
2022-03-16 18:18   ` Eric Sandeen
2022-03-15 23:23 ` [PATCH 2/5] mkfs: don't let internal logs consume more than 95% of an AG Darrick J. Wong
2022-03-16 18:50   ` Eric Sandeen [this message]
2022-03-31  5:21     ` Eric Sandeen
2022-03-31 16:20       ` Darrick J. Wong
2022-03-15 23:23 ` [PATCH 3/5] mkfs: increase the minimum log size to 64MB when possible Darrick J. Wong
2022-03-16 19:27   ` Eric Sandeen
2022-03-25 17:48   ` Eric Sandeen
2022-03-25 22:08     ` Darrick J. Wong
2022-03-15 23:23 ` [PATCH 4/5] mkfs: stop allowing tiny filesystems Darrick J. Wong
2022-03-15 23:23 ` [PATCH 5/5] mkfs: simplify the default log size ratio computation Darrick J. Wong

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=822cdfdc-358f-669e-d2db-31745643d614@redhat.com \
    --to=esandeen@redhat.com \
    --cc=allison.henderson@oracle.com \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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