public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, Eryu Guan <eguan@redhat.com>
Subject: Re: [PATCH] xfs: revert "xfs: factor rmap btree size into the indlen calculations"
Date: Wed, 6 Sep 2017 13:34:36 -0400	[thread overview]
Message-ID: <20170906173436.GH55280@bfoster.bfoster> (raw)
In-Reply-To: <20170903154050.GG4073@magnolia>

On Sun, Sep 03, 2017 at 08:40:50AM -0700, Darrick J. Wong wrote:
> On Sun, Sep 03, 2017 at 12:43:58AM -0700, Christoph Hellwig wrote:
> > On Sat, Sep 02, 2017 at 10:06:26AM -0700, Darrick J. Wong wrote:
> > > In commit fd26a88093ba we added a worst case estimate for rmapbt blocks
> > > needed to satisfy the block mapping request.  Since then, we added the
> > > ability to reserve enough space in each AG such that we should never run
> > > out of blocks to grow the rmapbt, which makes this calculation
> > > unnecessary.  Revert the commit because it makes the extra delalloc
> > > indlen accounting unnecessary and incorrect.
> > 
> > Do you remember any details of why we added it and what is supposed
> > to fix it?  I have memories of various issues in this area, but I
> > can't remember the details.
> 
> We'd fill the fs up with delalloc reservations until there wasn't any
> space, and once the fs fragmented badly then we suddenly needed more
> than just the indlen to satisfy bmbt + rmapbt expansion.  This indlen
> patch was a hack to try to ENOSPC out of write_begin/page_mkwrite before
> we ran the fs totally out of blocks back when we were still trying to
> cram the bmbt and rmap updates into a single huge transaction.  Deferred
> ops broke that, and perag reservations made it unnecesary, so now we can
> rip it out.
> 

It's not totally clear to me what the original patch would have done,
since we technically could return all of the indlen on delay -> real
extent conversion before the rmap operation would have even run. Perhaps
it could hide a problem by reserving blocks only to release them just
before we'd actually need to allocate rmapbt blocks..?

Anyways, the patch seems fine to me:

Reviewed-by: Brian Foster <bfoster@redhat.com>

> --D
> 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-09-06 17:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-02 17:06 [PATCH] xfs: revert "xfs: factor rmap btree size into the indlen calculations" Darrick J. Wong
2017-09-03  7:43 ` Christoph Hellwig
2017-09-03 15:40   ` Darrick J. Wong
2017-09-06 17:34     ` Brian Foster [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-09-23  7:11 Darrick J. Wong
2017-09-25 11:33 ` Brian Foster
2017-09-26 14: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=20170906173436.GH55280@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=darrick.wong@oracle.com \
    --cc=eguan@redhat.com \
    --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