Chandan Babu R 49391d1349 xfs: reserve disk space for online repairs [v28.1]
Online repair fixes metadata structures by writing a new copy out to
 disk and atomically committing the new structure into the filesystem.
 For this to work, we need to reserve all the space we're going to need
 ahead of time so that the atomic commit transaction is as small as
 possible.  We also require the reserved space to be freed if the system
 goes down, or if we decide not to commit the repair, or if we reserve
 too much space.
 
 To keep the atomic commit transaction as small as possible, we would
 like to allocate some space and simultaneously schedule automatic
 reaping of the reserved space, even on log recovery.  EFIs are the
 mechanism to get us there, but we need to use them in a novel manner.
 Once we allocate the space, we want to hold on to the EFI (relogging as
 necessary) until we can commit or cancel the repair.  EFIs for written
 committed blocks need to go away, but unwritten or uncommitted blocks
 can be freed like normal.
 
 Earlier versions of this patchset directly manipulated the log items,
 but Dave thought that to be a layering violation.  For v27, I've
 modified the defer ops handling code to be capable of pausing a deferred
 work item.  Log intent items are created as they always have been, but
 paused items are pushed onto a side list when finishing deferred work
 items, and pushed back onto the transaction after that.  Log intent done
 item are not created for paused work.
 
 The second part adds a "stale" flag to the EFI so that the repair
 reservation code can dispose of an EFI the normal way, but without the
 space actually being freed.
 
 This has been lightly tested with fstests.  Enjoy!
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZXEx4wAKCRBKO3ySh0YR
 phIZAQCeUpGo77FqSuvgbXOcePgdsrKqSrhCYNxXQqbmTnX6BQEA09ir+SHoWKDy
 cvYZ2AEgllh8zJKJsXYi0YO6Y7qj6gQ=
 =FuaR
 -----END PGP SIGNATURE-----

Merge tag 'repair-auto-reap-space-reservations-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA

xfs: reserve disk space for online repairs

Online repair fixes metadata structures by writing a new copy out to
disk and atomically committing the new structure into the filesystem.
For this to work, we need to reserve all the space we're going to need
ahead of time so that the atomic commit transaction is as small as
possible.  We also require the reserved space to be freed if the system
goes down, or if we decide not to commit the repair, or if we reserve
too much space.

To keep the atomic commit transaction as small as possible, we would
like to allocate some space and simultaneously schedule automatic
reaping of the reserved space, even on log recovery.  EFIs are the
mechanism to get us there, but we need to use them in a novel manner.
Once we allocate the space, we want to hold on to the EFI (relogging as
necessary) until we can commit or cancel the repair.  EFIs for written
committed blocks need to go away, but unwritten or uncommitted blocks
can be freed like normal.

Earlier versions of this patchset directly manipulated the log items,
but Dave thought that to be a layering violation.  For v27, I've
modified the defer ops handling code to be capable of pausing a deferred
work item.  Log intent items are created as they always have been, but
paused items are pushed onto a side list when finishing deferred work
items, and pushed back onto the transaction after that.  Log intent done
item are not created for paused work.

The second part adds a "stale" flag to the EFI so that the repair
reservation code can dispose of an EFI the normal way, but without the
space actually being freed.

This has been lightly tested with fstests.  Enjoy!

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>

* tag 'repair-auto-reap-space-reservations-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: force small EFIs for reaping btree extents
  xfs: log EFIs for all btree blocks being used to stage a btree
  xfs: implement block reservation accounting for btrees we're staging
  xfs: remove unused fields from struct xbtree_ifakeroot
  xfs: automatic freeing of freshly allocated unwritten space
  xfs: remove __xfs_free_extent_later
  xfs: allow pausing of pending deferred work items
  xfs: don't append work items to logged xfs_defer_pending objects
2023-12-07 14:18:33 +05:30
2023-12-03 08:43:35 +09:00
2023-12-02 06:39:30 +09:00
2023-12-01 08:00:02 +09:00
2023-12-03 09:03:07 +09:00
2023-12-03 08:37:39 +09:00
2023-12-03 08:02:49 +09:00
2023-12-03 08:02:49 +09:00
2023-11-24 09:45:40 -08:00
2023-11-29 19:43:34 -08:00
2023-11-04 08:07:19 -10:00
2023-11-03 09:28:53 -10:00
2023-12-01 14:17:54 +09:00
2023-11-03 09:48:17 -10:00
2023-09-07 13:52:20 -07:00
2022-09-28 09:02:20 +02:00
2022-10-10 12:00:45 -07:00
2023-12-02 08:42:39 +09:00
2023-12-03 18:52:56 +09:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 5.7 GiB
Languages
C 97.6%
Assembly 1%
Shell 0.5%
Python 0.3%
Makefile 0.3%