public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Stephen Zhang <starzhangzsd@gmail.com>
Cc: Carlos Maiolino <cmaiolino@redhat.com>,
	Zorro Lang <zlang@redhat.com>,
	Andrey Albershteyn <aalbersh@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>,
	xfs <linux-xfs@vger.kernel.org>,
	greg.marsden@oracle.com, shirley.ma@oracle.com,
	konrad.wilk@oracle.com, fstests <fstests@vger.kernel.org>
Subject: Re: [NYE PATCHCYCLONE] xfs: free space defrag and autonomous self healing
Date: Mon, 6 Jan 2025 16:26:19 -0800	[thread overview]
Message-ID: <20250107002619.GO6174@frogsfrogsfrogs> (raw)
In-Reply-To: <CANubcdXWHOtTW4PjJE1qjAJHEg48LS7MFc065gcQwoH7s0Ybqw@mail.gmail.com>

On Thu, Jan 02, 2025 at 09:37:47AM +0800, Stephen Zhang wrote:
> Darrick J. Wong <djwong@kernel.org> 于2025年1月1日周三 07:25写道:
> >
> > Hi everyone,
> >
> > Thank you all for helping get online repair, parent pointers, and
> > metadata directory trees, and realtime allocation groups merged this
> > year!  We got a lot done in 2024.
> >
> > Having sent pull requests to Carlos for the last pieces of the realtime
> > modernization project, I have exactly two worthwhile projects left in my
> > development trees!  The stuff here isn't necessarily in mergeable state
> > yet, but I still believe everyone ought to know what I'm up to.
> >
> > The first project implements (somewhat buggily; I never quite got back
> > to dealing with moving eof blocks) free space defragmentation so that we
> > can meaningfully shrink filesystems; garbage collect regions of the
> > filesystem; or prepare for large allocations.  There's not much new
> > kernel code other than exporting refcounts and gaining the ability to
> > map free space.
> >
> > The second project initiates filesystem self healing routines whenever
> > problems start to crop up, which means that it can run fully
> > autonomously in the background.  The monitoring system uses some
> > pseudo-file and seqbuf tricks that I lifted from kmo last winter.
> >
> > Both of these projects are largely userspace code.
> >
> > Also I threw in some xfs_repair code to do dangerous fs upgrades.
> > Nobody should use these, ever.
> >
> > Maintainers: please do not merge, this is a dog-and-pony show to attract
> > developer attention.
> >
> 
> [Add Dave to the list]
> 
> Hi, Darrick and all,
> 
> Recently, I have been considering implementing the XFS shrink feature based
> on the AF concept, which was mentioned in this link:
> 
> https://lore.kernel.org/linux-xfs/20241104014439.3786609-1-zhangshida@kylinos.cn/
> 
> In the lore link, it stated:
> The rules used by AG are more about extending outwards.
> whilst
> The rules used by AF are more about restricting inwards.
> 
> where the AF concept implicitly and naturally involves the semantics of
> compressing/shrinking(restricting).
> 
> AG(for xfs extend) and AF(for xfs shrink) are constructed in a symmetrical way,
> in which it is more elegant and easier to build more complex features on it.
> 
> To elaborate further, for example, AG should not be seen as
> independent entities in
> the shrink context. That means each AG requires separate
> managements(flags or something to indicate the state of that
> AG/region), which would increase the system complexity compared to the
> idea behind AF. AF views several AGs as a whole.
> 
> And when it comes to growfs, things start to get a little more
> complicated, and AF
> can handle it easily and naturally.
> 
> However talk is too cheap, to validate our point, we truly hope to have the
> opportunity to participate in developing these features by integrating
> the existing
> infrastructure you have already established with the AF concept.

Hmm, now that's interesting -- using the AF ("allocation fencing"?)
capability to constrain allocations to a subset of AGs, and then slowly
rewriting files and whatnot to migrate data to other AGs.  Eventually
you end up with an AG that's empty and therefore ready for shrink.

That's definitely a different way to do that than what I did (add a
"mapfree" ioctl to pin space to a file).  I'll ponder these 2 approaches
a bit more.

--D

> Best regards,
> Shida
> 
> 
> 
> > --D
> >
> > PS: I'll be back after the holidays to look at the zoned/atomic/fsverity
> > patches.  And finally rebase fstests to 2024-12-08.
> >
> 

      reply	other threads:[~2025-01-07  0:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-31 23:25 [NYE PATCHCYCLONE] xfs: free space defrag and autonomous self healing Darrick J. Wong
2024-12-31 23:34 ` [PATCHSET 1/5] fstests: functional test for refcount reporting Darrick J. Wong
2024-12-31 23:56   ` [PATCH 1/1] xfs: test output of new FSREFCOUNTS ioctl Darrick J. Wong
2024-12-31 23:35 ` [PATCHSET 2/5] fstests: defragment free space Darrick J. Wong
2024-12-31 23:56   ` [PATCH 1/1] xfs: test clearing of " Darrick J. Wong
2024-12-31 23:35 ` [PATCHSET 3/5] fstests: capture logs from mount failures Darrick J. Wong
2024-12-31 23:56   ` [PATCH 1/2] treewide: convert all $MOUNT_PROG to _mount Darrick J. Wong
2024-12-31 23:56   ` [PATCH 2/2] check: capture dmesg of mount failures if test fails Darrick J. Wong
2025-01-06 11:18     ` Nirjhar Roy
2025-01-06 23:52       ` Darrick J. Wong
2025-01-13  5:55         ` Nirjhar Roy
2024-12-31 23:35 ` [PATCHSET 4/5] fstests: live health monitoring of filesystems Darrick J. Wong
2024-12-31 23:57   ` [PATCH 1/6] misc: convert all $UMOUNT_PROG to a _umount helper Darrick J. Wong
2024-12-31 23:57   ` [PATCH 2/6] misc: convert all umount(1) invocations to _umount Darrick J. Wong
2024-12-31 23:57   ` [PATCH 3/6] xfs: test health monitoring code Darrick J. Wong
2024-12-31 23:57   ` [PATCH 4/6] xfs: test for metadata corruption error reporting via healthmon Darrick J. Wong
2024-12-31 23:58   ` [PATCH 5/6] xfs: test io " Darrick J. Wong
2024-12-31 23:58   ` [PATCH 6/6] xfs: test new xfs_scrubbed daemon Darrick J. Wong
2024-12-31 23:35 ` [PATCHSET 5/5] fstests: add difficult V5 features to filesystems Darrick J. Wong
2024-12-31 23:58   ` [PATCH 1/3] xfs/1856: add metadir upgrade to test matrix Darrick J. Wong
2024-12-31 23:58   ` [PATCH 2/3] xfs/1856: add rtrmapbt " Darrick J. Wong
2024-12-31 23:59   ` [PATCH 3/3] xfs/1856: add rtreflink " Darrick J. Wong
2025-01-02  1:37 ` [NYE PATCHCYCLONE] xfs: free space defrag and autonomous self healing Stephen Zhang
2025-01-07  0:26   ` 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=20250107002619.GO6174@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=aalbersh@redhat.com \
    --cc=cmaiolino@redhat.com \
    --cc=david@fromorbit.com \
    --cc=fstests@vger.kernel.org \
    --cc=greg.marsden@oracle.com \
    --cc=hch@infradead.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=shirley.ma@oracle.com \
    --cc=starzhangzsd@gmail.com \
    --cc=zlang@redhat.com \
    /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