From: Gao Xiang <hsiangkao@redhat.com>
To: Brian Foster <bfoster@redhat.com>
Cc: linux-xfs@vger.kernel.org, "Darrick J. Wong" <darrick.wong@oracle.com>
Subject: Re: [RFC PATCH v2] xfs: support shrinking unused space in the last AG
Date: Sat, 31 Oct 2020 12:42:08 +0800 [thread overview]
Message-ID: <20201031044208.GA263178@xiangao.remote.csb> (raw)
In-Reply-To: <20201030175114.GF1794672@bfoster>
On Fri, Oct 30, 2020 at 01:51:14PM -0400, Brian Foster wrote:
> On Fri, Oct 30, 2020 at 11:02:59PM +0800, Gao Xiang wrote:
...
> > >
> > > That said, this is still quite incomplete in that we can only reduce the
> > > size of the tail AG, and if any of that space is in use, we don't
> > > currently do anything to try and rectify that. Given that, I'd be a
> > > little hesitant to expose this feature as is to production users. IMO,
> > > the current kernel feature state could be mergeable but should probably
> > > also be buried under XFS_DEBUG until things are more polished. To me,
> > > the ideal level of completeness to expose something in production
> > > kernels might be something that can 1. relocate used blocks out of the
> > > target range and then possibly 2. figure out how to chop off entire AGs.
> > > My thinking is that if we never get to that point for whatever
> > > reason(s), at least DEBUG mode allows us the flexibility to drop the
> > > thing entirely without breaking real users.
> >
> > Yeah, I also think XFS_DEBUG or another experimential build config
> > is needed.
> >
> > Considering that, I think it would better to seperate into 2 functions
> > as Darrick suggested in the next version to avoid too many
> > #ifdef XFS_DEBUG #endif hunks.
> >
>
> Another option could be to just retain the existing error checking logic
> and wrap it in an ifdef. I.e.:
>
> #ifndef DEBUG
> /* shrink only allowed in debug mode for now ... */
> if (nb < mp->m_sb.sb_dblocks)
> return -EINVAL;
> #endif
>
> Then the rest of the function doesn't have to be factored differently
> just because of the ifdef.
Yeah, on the runtime side, that is ok. Yet the growfs expend common code
has been modified due to this patch so it might cause some potential
regression (but I don't think for now.) Either way is good to me.
Thanks,
Gao Xiang
>
> Brian
>
prev parent reply other threads:[~2020-10-31 4:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 23:13 [RFC PATCH v2] xfs: support shrinking unused space in the last AG Gao Xiang
2020-10-30 14:47 ` Brian Foster
2020-10-30 15:02 ` Gao Xiang
2020-10-30 17:51 ` Brian Foster
2020-10-31 4:42 ` Gao Xiang [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=20201031044208.GA263178@xiangao.remote.csb \
--to=hsiangkao@redhat.com \
--cc=bfoster@redhat.com \
--cc=darrick.wong@oracle.com \
--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