No description
  • C 96.9%
  • Assembly 0.9%
  • Rust 0.6%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Dave Chinner bed25d8010 xfs: design documentation for online fsck [v24.5]
After six years of development and a nearly two year hiatus from
 patchbombing, I think it is time to resume the process of merging the
 online fsck feature into XFS.  The full patchset comprises 105 separate
 patchsets that capture 470 patches across the kernel, xfsprogs, and
 fstests projects.
 
 I would like to merge this feature into upstream in time for the 2023
 LTS kernel.  As of 5.15 (aka last year's LTS), we have merged all
 generally useful infrastructure improvements into the regular
 filesystem.  The only changes to the core filesystem that remain are the
 ones that are only useful to online fsck itself.  In other words, the
 vast majority of the new code in the patchsets comprising the online
 fsck feature are is mostly self contained and can be turned off via
 Kconfig.
 
 Many of you readers might be wondering -- why have I chosen to make one
 large submission with 100+ patchsets comprising ~500 patches?  Why
 didn't I merge small pieces of functionality bit by bit and revise
 common code as necessary?  Well, the simple answer is that in the past
 six years, the fundamental algorithms have been revised repeatedly as
 I've built out the functionality.  In other words, the codebase as it is
 now has the benefit that I now know every piece that's necessary to get
 the job done in a reasonable manner and within the constraints laid out
 by community reviews.  I believe this has reduced code churn in mainline
 and freed up my time so that I can iterate faster.
 
 As a concession to the mail servers, I'm breaking up the submission into
 smaller pieces; I'm only pushing the design document and the revisions
 to the existing scrub code, which is the first 20%% of the patches.
 Also, I'm arbitrarily restarting the version numbering by reversioning
 all patchsets from version 22 to epoch 23, version 1.
 
 The big question to everyone reading this is: How might I convince you
 that there is more merit in merging the whole feature and dealing with
 the consequences than continuing to maintain it out of tree?
 
 ---------
 
 To prepare the XFS community and potential patch reviewers for the
 upstream submission of the online fsck feature, I decided to write a
 document capturing the broader picture behind the online repair
 development effort.  The document begins by defining the problems that
 online fsck aims to solve and outlining specific use cases for the
 functionality.
 
 Using that as a base, the rest of the design document presents the high
 level algorithms that fulfill the goals set out at the start and the
 interactions between the large pieces of the system.  Case studies round
 out the design documentation by adding the details of exactly how
 specific parts of the online fsck code integrate the algorithms with the
 filesystem.
 
 The goal of this effort is to help the XFS community understand how the
 gigantic online repair patchset works.  The questions I submit to the
 community reviewers are:
 
 1. As you read the design doc (and later the code), do you feel that you
    understand what's going on well enough to try to fix a bug if you
    found one?
 
 2. What sorts of interactions between systems (or between scrub and the
    rest of the kernel) am I missing?
 
 3. Do you feel confident enough in the implementation as it is now that
    the benefits of merging the feature (as EXPERIMENTAL) outweigh any
    potential disruptions to XFS at large?
 
 4. Are there problematic interactions between subsystems that ought to
    be cleared up before merging?
 
 5. Can I just merge all of this?
 
 I intend to commit this document to the kernel's documentation directory
 when we start merging the patchset, albeit without the links to
 git.kernel.org.  A much more readable version of this is posted at:
 https://djwong.org/docs/xfs-online-fsck-design/
 
 v2: add missing sections about: all the in-kernel data structures and
     new apis that the scrub and repair functions use; how xattrs and
     directories are checked; how space btree records are checked; and
     add more details to the parts where all these bits tie together.
     Proofread for verb tense inconsistencies and eliminate vague 'we'
     usage.  Move all the discussion of what we can do with pageable
     kernel memory into a single source file and section.  Document where
     log incompat feature locks fit into the locking model.
 
 v3: resync with 6.0, fix a few typos, begin discussion of the merging
     plan for this megapatchset.
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZDYdlwAKCRBKO3ySh0YR
 pk3vAP0f5Ciq3sMiFtyJxa1YhAic626OejV8gmDqtt6dsu54lQEAtvokdzGw3012
 Q10X4CB5s1O/UGYb0EI7AFrHSZNtcAk=
 =k7BA
 -----END PGP SIGNATURE-----

Merge tag 'online-fsck-design-6.4_2023-04-11' of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next

xfs: design documentation for online fsck [v24.5]

After six years of development and a nearly two year hiatus from
patchbombing, I think it is time to resume the process of merging the
online fsck feature into XFS.  The full patchset comprises 105 separate
patchsets that capture 470 patches across the kernel, xfsprogs, and
fstests projects.

I would like to merge this feature into upstream in time for the 2023
LTS kernel.  As of 5.15 (aka last year's LTS), we have merged all
generally useful infrastructure improvements into the regular
filesystem.  The only changes to the core filesystem that remain are the
ones that are only useful to online fsck itself.  In other words, the
vast majority of the new code in the patchsets comprising the online
fsck feature are is mostly self contained and can be turned off via
Kconfig.

Many of you readers might be wondering -- why have I chosen to make one
large submission with 100+ patchsets comprising ~500 patches?  Why
didn't I merge small pieces of functionality bit by bit and revise
common code as necessary?  Well, the simple answer is that in the past
six years, the fundamental algorithms have been revised repeatedly as
I've built out the functionality.  In other words, the codebase as it is
now has the benefit that I now know every piece that's necessary to get
the job done in a reasonable manner and within the constraints laid out
by community reviews.  I believe this has reduced code churn in mainline
and freed up my time so that I can iterate faster.

As a concession to the mail servers, I'm breaking up the submission into
smaller pieces; I'm only pushing the design document and the revisions
to the existing scrub code, which is the first 20%% of the patches.
Also, I'm arbitrarily restarting the version numbering by reversioning
all patchsets from version 22 to epoch 23, version 1.

The big question to everyone reading this is: How might I convince you
that there is more merit in merging the whole feature and dealing with
the consequences than continuing to maintain it out of tree?

---------

To prepare the XFS community and potential patch reviewers for the
upstream submission of the online fsck feature, I decided to write a
document capturing the broader picture behind the online repair
development effort.  The document begins by defining the problems that
online fsck aims to solve and outlining specific use cases for the
functionality.

Using that as a base, the rest of the design document presents the high
level algorithms that fulfill the goals set out at the start and the
interactions between the large pieces of the system.  Case studies round
out the design documentation by adding the details of exactly how
specific parts of the online fsck code integrate the algorithms with the
filesystem.

The goal of this effort is to help the XFS community understand how the
gigantic online repair patchset works.  The questions I submit to the
community reviewers are:

1. As you read the design doc (and later the code), do you feel that you
   understand what's going on well enough to try to fix a bug if you
   found one?

2. What sorts of interactions between systems (or between scrub and the
   rest of the kernel) am I missing?

3. Do you feel confident enough in the implementation as it is now that
   the benefits of merging the feature (as EXPERIMENTAL) outweigh any
   potential disruptions to XFS at large?

4. Are there problematic interactions between subsystems that ought to
   be cleared up before merging?

5. Can I just merge all of this?

I intend to commit this document to the kernel's documentation directory
when we start merging the patchset, albeit without the links to
git.kernel.org.  A much more readable version of this is posted at:
https://djwong.org/docs/xfs-online-fsck-design/

v2: add missing sections about: all the in-kernel data structures and
    new apis that the scrub and repair functions use; how xattrs and
    directories are checked; how space btree records are checked; and
    add more details to the parts where all these bits tie together.
    Proofread for verb tense inconsistencies and eliminate vague 'we'
    usage.  Move all the discussion of what we can do with pageable
    kernel memory into a single source file and section.  Document where
    log incompat feature locks fit into the locking model.

v3: resync with 6.0, fix a few typos, begin discussion of the merging
    plan for this megapatchset.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
History 2023-04-14 07:08:05 +10:00
arch - Add a new Intel Arrow Lake CPU model number 2023-04-09 10:00:16 -07:00
block block: don't set GD_NEED_PART_SCAN if scan partition failed 2023-04-06 20:41:53 -06:00
certs Kbuild updates for v6.3 2023-02-26 11:53:25 -08:00
crypto asymmetric_keys: log on fatal failures in PE/pkcs7 2023-03-21 16:23:56 +00:00
Documentation xfs: document future directions of online fsck 2023-04-11 18:59:52 -07:00
drivers cxl fixes for v6.3-rc6 2023-04-09 09:45:46 -07:00
fs xfs: fix BUG_ON in xfs_getbmap() 2023-04-12 15:49:44 +10:00
include cxl fixes for v6.3-rc6 2023-04-09 09:45:46 -07:00
init bootconfig: Change message if no bootconfig with CONFIG_BOOT_CONFIG_FORCE=y 2023-03-22 22:21:43 +09:00
io_uring io_uring-6.3-2023-04-06 2023-04-08 11:34:17 -07:00
ipc Merge branch 'work.namespace' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2023-02-24 19:20:07 -08:00
kernel - Fix "same task" check when redirecting event output 2023-04-09 10:10:46 -07:00
lib maple_tree: fix a potential concurrency bug in RCU mode 2023-04-05 18:06:25 -07:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm mm/swap: fix swap_info_struct race between swapoff and get_swap_pages() 2023-04-05 18:06:24 -07:00
net Including fixes from wireless and can. 2023-04-06 11:39:07 -07:00
rust Rust fixes for 6.3-rc1 2023-03-03 14:51:15 -08:00
samples LoongArch changes for v6.3 2023-03-01 09:27:00 -08:00
scripts Kbuild fixes for v6.3 (2nd) 2023-04-01 09:25:17 -07:00
security keys: Do not cache key in task struct if key is requested from kernel thread 2023-03-21 16:22:40 +00:00
sound ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement 2023-04-01 18:05:48 +02:00
tools 28 hotfixes. 2023-04-08 10:51:12 -07:00
usr usr/gen_init_cpio.c: remove unnecessary -1 values from int file 2022-10-03 14:21:44 -07:00
virt KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent 2023-03-31 11:19:05 -04:00
.clang-format cpumask: re-introduce constant-sized cpumask optimizations 2023-03-05 14:30:34 -08:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for *.dtso files 2023-02-26 15:28:23 +09:00
.gitignore kbuild: rpm-pkg: move source components to rpmbuild/SOURCES 2023-03-16 22:45:56 +09:00
.mailmap mailmap: add an entry for Leonard Crestez 2023-03-28 15:24:32 -07:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS There is no particular theme here - mainly quick hits all over the tree. 2023-02-23 17:55:40 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS Driver core fixes for 6.3-rc5 2023-04-02 10:10:16 -07:00
Makefile Linux 6.3-rc6 2023-04-09 11:15:57 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06: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.