FreeBSD src
Go to file
Serapheim Dimitropoulos 425d3237ee Get rid of space_map_update() for ms_synced_length
Initially, metaslabs and space maps used to be the same thing
in ZFS. Later, we started differentiating them by referring
to the space map as the on-disk state of the metaslab, making
the metaslab a higher-level concept that is metadata that deals
with space accounting. Today we've managed to split that code
furthermore, with the space map being its own on-disk data
structure used in areas of ZFS besides metaslabs (e.g. the
vdev-wide space maps used for zpool checkpoint or vdev removal
features).

This patch refactors the space map code to further split the
space map code from the metaslab code. It does so by getting
rid of the idea that the space map can have a different in-core
and on-disk length (sm_length vs smp_length) which is something
that is only used for the metaslab code, and other consumers
of space maps just have to deal with. Instead, this patch
introduces changes that move the old in-core length of the
metaslab's space map to the metaslab structure itself (see
ms_synced_length field) while making the space map code only
care about the actual space map's length on-disk.

The result of this is that space map consumers no longer have
to deal with syncing two different lengths for the same
structure (e.g. space_map_update() goes away) while metaslab
specific behavior stays within the metaslab code. Specifically,
the ms_synced_length field keeps track of the amount of data
metaslab_load() can read from the metaslab's space map while
working concurrently with metaslab_sync() that may be
appending to that same space map.

As a side note, the patch also adds a few comments around
the metaslab code documenting some assumptions and expected
behavior.

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #8328
2019-02-12 10:38:11 -08:00
.github Bump commit subject length to 72 characters 2019-01-08 09:23:05 -08:00
cmd Get rid of space_map_update() for ms_synced_length 2019-02-12 10:38:11 -08:00
config Linux 5.0 compat: Fix bio_set_dev() 2019-01-28 10:11:45 -08:00
contrib ZVOLs should not be allowed to have children 2019-02-08 15:44:15 -08:00
etc Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
include Get rid of space_map_update() for ms_synced_length 2019-02-12 10:38:11 -08:00
lib ZVOLs should not be allowed to have children 2019-02-08 15:44:15 -08:00
man Pool allocation classes misplacing small file blocks 2019-02-08 12:32:12 -08:00
module Get rid of space_map_update() for ms_synced_length 2019-02-12 10:38:11 -08:00
rpm Exclude test-runner.py from the rpmbuild shebang check 2019-01-28 10:11:45 -08:00
scripts OpenZFS 9185 - Enable testing over NFS in ZFS performance tests 2019-02-04 09:27:37 -08:00
tests ZVOLs should not be allowed to have children 2019-02-08 15:44:15 -08:00
udev Add enclosure_symlinks option to vdev_id 2018-12-14 17:27:49 -08:00
.gitignore Verify .gitignore entries 2019-01-15 11:56:29 -08:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
.travis.yml Add .travis.yml 2017-11-13 09:18:18 -08:00
AUTHORS Update build system and packaging 2018-05-29 16:00:33 -07:00
autogen.sh Cause autogen.sh to fail if autoreconf fails 2018-07-06 09:27:37 -07:00
configure.ac Use ZFS version for pyzfs & drop unused reqs file 2019-01-08 15:56:42 -08:00
copy-builtin Allow copy-builtin to work with modified sources 2018-10-17 12:06:05 -07:00
COPYRIGHT Update build system and packaging 2018-05-29 16:00:33 -07:00
LICENSE Update build system and packaging 2018-05-29 16:00:33 -07:00
Makefile.am Verify .gitignore entries 2019-01-15 11:56:29 -08:00
META Tag 0.8.0-rc3 2019-01-14 12:40:42 -08:00
NEWS Add NEWS file 2018-09-18 12:03:47 -07:00
NOTICE Update build system and packaging 2018-05-29 16:00:33 -07:00
README.md Explicitly state supported Linux versions 2018-05-30 20:11:19 -07:00
TEST Update build system and packaging 2018-05-29 16:00:33 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

img

ZFS on Linux is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the OpenZFS community.

codecov coverity

Official Resources

Installation

Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.

Contribute & Develop

We have a separate document with contribution guidelines.

Release

ZFS on Linux is released under a CDDL license.
For more details see the NOTICE, LICENSE and COPYRIGHT files; UCRL-CODE-235197

Supported Kernels

  • The META file contains the officially recognized supported kernel versions.