linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: perag initialization should only touch m_ag_max_usable for AG 0
Date: Thu, 21 Sep 2017 10:12:58 -0700	[thread overview]
Message-ID: <20170921171258.GI7112@magnolia> (raw)
In-Reply-To: <20170921140421.GA24142@infradead.org>

On Thu, Sep 21, 2017 at 07:04:21AM -0700, Christoph Hellwig wrote:
> On Tue, Sep 19, 2017 at 11:10:41AM -0700, Darrick J. Wong wrote:
> > We call __xfs_ag_resv_init to make a per-AG reservation for each AG.
> > This makes the reservation per-AG, not per-filesystem.  Therefore, it
> > is incorrect to adjust m_ag_max_usable for each AG.  Adjust it only
> > when we're reserving AG 0's blocks so that we only do it once per fs.
> 
> This looks correct to me, but I hate how we manipulate a per-mount
> value.  Is there a way we can just move this to the caller?

I'm not sure which caller you're referring to -- if you mean
xfs_ag_resv_init, then we'd still have the "if (pag->agno == 0)
xfs_mod_fdblocks(...)"; and if xfs_fs_reserve_ag_blocks then you'd have
to bubble the two ask values up out of xfs_ag_resv_init, which also
seems like a layering violation.  Modifying fdblocks in
__xfs_ag_resv_init (Dave I think is sharpening his axe on that) smells
kinda funny but it's less code intensive.

<confused>

--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

      reply	other threads:[~2017-09-21 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 18:10 [PATCH] xfs: perag initialization should only touch m_ag_max_usable for AG 0 Darrick J. Wong
2017-09-20 13:23 ` Brian Foster
2017-09-21 14:04 ` Christoph Hellwig
2017-09-21 17:12   ` Darrick J. Wong [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=20170921171258.GI7112@magnolia \
    --to=darrick.wong@oracle.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;
as well as URLs for NNTP newsgroup(s).