freebsd-nq/man/man8
George Amanakis 657fd33bcf
Improvements on persistent L2ARC
Functional changes:

We implement refcounts of log blocks and their aligned size on the
cache device along with two corresponding arcstats. The refcounts are
reflected in the header of the device and provide valuable information
as to whether log blocks are accounted for correctly. These are
dynamically adjusted as log blocks are committed/evicted. zdb also uses
this information in the device header and compares it to the
corresponding values as reported by dump_l2arc_log_blocks() which
emulates l2arc_rebuild(). If the refcounts saved in the device header
report higher values, zdb exits with an error. For this feature to work
correctly there should be no active writes on the device. This is also
employed in the tests of persistent L2ARC. We extend the structure of
the cache device header by adding the two new variables mirroring the
refcounts after the existing variables to preserve backward
compatibility in terms of persistent L2ARC.

1) a new arcstat "l2_log_blk_asize" and refcount "l2ad_lb_asize" which
   reflect the total aligned size of log blocks on the device. This is
   also reflected in the header of the cache device as "dh_lb_asize".
2) a new arcstat "l2arc_log_blk_count" and refcount "l2ad_lb_count"
   which reflect the total number of L2ARC log blocks present on cache
   devices.  It is also reflected in the header of the cache device as
   "dh_lb_count".

In l2arc_rebuild_vdev() if the amount of committed log entries in a log
block is 0 and the device header is valid we update the device header.
This will facilitate trimming of the whole device in this case when
TRIM for L2ARC is implemented.

Improve loop protection in l2arc_rebuild() by using the starting offset
of the payload of each log block instead of the starting offset of the
log block.

If the zio in l2arc_write_buffers() fails, restore the lbps array in the
header of the device to its previous state in l2arc_write_done().

If l2arc_rebuild() ends the rebuild process without restoring any L2ARC
log blocks in ARC and without any other error, this means that the lbps
array in the header is pointing to non-existent or invalid log blocks.
Reset the device header in this case.

In l2arc_rebuild() change the zfs_dbgmsg messages to
spa_history_log_internal() making them user visible with zpool history
command.

Non-functional changes:

Make the first test in persistent L2ARC use `zdb -lll` to increase
coverage in `zdb.c`.

Rename psize with asize when referring to log blocks, since
L2ARC_SET_PSIZE stores the vdev aligned size for log blocks. Also
rename dh_log_blk_entries to dh_log_entries to make it clear that
it is a mirror of l2ad_log_entries. Added comments for both changes.

Fix inaccurate comments for example in l2arc_log_blk_restore().

Add asserts at the end in l2arc_evict() and l2arc_write_buffers().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #10228
2020-05-07 16:34:03 -07:00
..
.gitignore Ignore *.o.ur-safe build artifacts 2018-05-13 18:59:02 -07:00
fsck.zfs.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
Makefile.am Add zstream redup command to convert deduplicated send streams 2020-04-10 10:39:55 -07:00
mount.zfs.8 zfs.8 & mount.zfs.8: fix a few typos 2016-05-16 12:26:31 -07:00
vdev_id.8 vdev_id support for device link aliases 2012-12-03 14:04:47 -08:00
zdb.8 Improvements on persistent L2ARC 2020-05-07 16:34:03 -07:00
zed.8.in Change http://zfsonlinux.org links to https://zfsonlinux.org 2020-01-13 16:43:59 -08:00
zfs-allow.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-bookmark.8 Implement bookmark copying 2020-02-11 13:19:12 -08:00
zfs-change-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-clone.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-create.8 zfs_create: round up volume size to multiple of bs 2020-04-24 19:04:34 -07:00
zfs-destroy.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-diff.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-get.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-groupspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-hold.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-inherit.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-jail.8 Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs-list.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-load-key.8 Document zfs change-key caveats 2020-01-14 10:11:07 -08:00
zfs-mount-generator.8.in Systemd mount generator: Generate noauto units; add control properties 2020-02-14 15:32:55 -08:00
zfs-mount.8 Add notice that forcefully unmount is not supported on Linux 2020-02-18 13:36:23 -08:00
zfs-program.8 Support setting user properties in a channel program 2020-02-14 13:41:42 -08:00
zfs-project.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-projectspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-promote.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-receive.8 Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
zfs-recv.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-redact.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-release.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-rename.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-rollback.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-send.8 Remove deduplicated send/receive code 2020-04-23 10:06:57 -07:00
zfs-set.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-share.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-snapshot.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unallow.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unjail.8 Add FreeBSD jail support hooks 2019-12-11 11:58:37 -08:00
zfs-unload-key.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-unmount.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-upgrade.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-userspace.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfs-wait.8 Add 'zfs wait' command 2020-04-01 10:02:06 -07:00
zfs.8 OpenZFS 742 - Resurrect the ZFS "aclmode" property OpenZFS 664 - Umask masking "deny" ACL entries OpenZFS 279 - Bug in the new ACL (post-PSARC/2010/029) semantics 2020-04-30 11:22:45 -07:00
zfsconcepts.8 Reorganize zfs(8) man page into sections 2019-11-12 11:17:40 -08:00
zfsprops.8 OpenZFS 3254 - add support in zfs for aclmode=restricted 2020-04-30 11:23:59 -07:00
zgenhostid.8 Correct man page dates 2019-05-08 10:59:32 -07:00
zinject.8 Multiple DVA Scrubbing Fix 2019-03-15 14:14:31 -07:00
zpool-add.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-attach.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-checkpoint.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-clear.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-create.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-destroy.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-detach.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-events.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-export.8 Add notice that forcefully unmount is not supported on Linux 2020-02-18 13:36:23 -08:00
zpool-get.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-history.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-import.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-initialize.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-iostat.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-labelclear.8 Persistent L2ARC 2020-04-10 10:33:35 -07:00
zpool-list.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-offline.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-online.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-reguid.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-remove.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-reopen.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-replace.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-resilver.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-scrub.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-set.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-split.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-status.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-sync.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-trim.8 Add trim support to zpool wait 2020-03-04 15:07:11 -08:00
zpool-upgrade.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zpool-wait.8 Add trim support to zpool wait 2020-03-04 15:07:11 -08:00
zpool.8 Fix ZPOOL_VDEV_NAME_PATH option description 2020-01-06 10:43:32 -08:00
zpoolconcepts.8 Persistent L2ARC 2020-04-10 10:33:35 -07:00
zpoolprops.8 Reorganize zpool(8) man page into sections 2019-11-13 09:21:07 -08:00
zstream.8 Add zstream redup command to convert deduplicated send streams 2020-04-10 10:39:55 -07:00
zstreamdump.8 Eliminate useless double-bolding in man pages 2019-04-24 17:04:35 -07:00