All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/7] xfs: fix uninitialized variables in xrep_calc_ag_resblks
Date: Fri, 5 Mar 2021 09:49:41 -0800	[thread overview]
Message-ID: <20210305174941.GH3419940@magnolia> (raw)
In-Reply-To: <20210305082300.GA2567783@infradead.org>

On Fri, Mar 05, 2021 at 08:23:00AM +0000, Christoph Hellwig wrote:
> On Tue, Mar 02, 2021 at 02:28:42PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> > 
> > If we can't read the AGF header, we never actually set a value for
> > freelen and usedlen.  These two variables are used to make the worst
> > case estimate of btree size, so it's safe to set them to the AG size as
> > a fallback.
> 
> Do we actually want to continue with the rest of the funtion at all
> in this case?

We do, because this function computes the amount of block reservation to
feed to xfs_trans_alloc when userspace said it wants us to try to repair
something AG-related.

Although... I suppose we don't really need a block reservation to repair
superblocks and AG headers, so we could special-case those four scrub
types to return 0.

(OTOH this is all mostly academic because repair requires rmapbt, which
means that the fs won't even mount with a busted AGF...)

--D

  reply	other threads:[~2021-03-05 17:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 22:28 [PATCHSET 0/7] xfs: small fixes and cleanups Darrick J. Wong
2021-03-02 22:28 ` [PATCH 1/7] xfs: fix uninitialized variables in xrep_calc_ag_resblks Darrick J. Wong
2021-03-05  8:23   ` Christoph Hellwig
2021-03-05 17:49     ` Darrick J. Wong [this message]
2021-03-06  7:15   ` Christoph Hellwig
2021-03-02 22:28 ` [PATCH 2/7] xfs: fix dquot scrub loop cancellation Darrick J. Wong
2021-03-05  8:24   ` Christoph Hellwig
2021-03-02 22:28 ` [PATCH 3/7] xfs: bail out of scrub immediately if scan incomplete Darrick J. Wong
2021-03-05  8:25   ` Christoph Hellwig
2021-03-02 22:28 ` [PATCH 4/7] xfs: mark a data structure sick if there are cross-referencing errors Darrick J. Wong
2021-03-05  8:26   ` Christoph Hellwig
2021-03-02 22:29 ` [PATCH 5/7] xfs: set the scrub AG number in xchk_ag_read_headers Darrick J. Wong
2021-03-05  8:27   ` Christoph Hellwig
2021-03-02 22:29 ` [PATCH 6/7] xfs: remove return value from xchk_ag_btcur_init Darrick J. Wong
2021-03-05  8:28   ` Christoph Hellwig
2021-03-02 22:29 ` [PATCH 7/7] xfs: validate ag btree levels using the precomputed values Darrick J. Wong
2021-03-05  8:29   ` 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=20210305174941.GH3419940@magnolia \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.