freebsd-dev/cmd
Tom Caputi d4a72f2386 Sequential scrub and resilvers
Currently, scrubs and resilvers can take an extremely
long time to complete. This is largely due to the fact
that zfs scans process pools in logical order, as
determined by each block's bookmark. This makes sense
from a simplicity perspective, but blocks in zfs are
often scattered randomly across disks, particularly
due to zfs's copy-on-write mechanisms.

This patch improves performance by splitting scrubs
and resilvers into a metadata scanning phase and an IO
issuing phase. The metadata scan reads through the
structure of the pool and gathers an in-memory queue
of I/Os, sorted by size and offset on disk. The issuing
phase will then issue the scrub I/Os as sequentially as
possible, greatly improving performance.

This patch also updates and cleans up some of the scan
code which has not been updated in several years.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Authored-by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Authored-by: Alek Pinchuk <apinchuk@datto.com>
Authored-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #3625 
Closes #6256
2017-11-15 17:27:01 -08:00
..
arc_summary Minor code cleanups in arc_python.py 2017-11-15 10:28:11 -08:00
arcstat arcstat: flush stdout / outfile after each line 2017-10-26 12:18:49 -07:00
dbufstat Add support for DMU_OTN_* types in dbufstat.py 2017-08-22 11:53:40 -07:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
raidz_test Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
vdev_id vdev_id: extension for new scsi topology 2017-09-27 10:39:47 -07:00
zdb Sequential scrub and resilvers 2017-11-15 17:27:01 -08:00
zed Added no_scrub_restart flag to zpool reopen 2017-10-26 12:26:09 -07:00
zfs Fix coverity defects: 147480, 147584 2017-10-16 15:32:48 -07:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
zinject Add corruption failure option to zinject(8) 2017-08-14 15:17:15 -07:00
zpool Sequential scrub and resilvers 2017-11-15 17:27:01 -08:00
zstreamdump Native Encryption for ZFS on Linux 2017-08-14 10:36:48 -07:00
ztest OpenZFS 640 - number_to_scaled_string is duplicated in several commands 2017-10-30 14:47:20 -07:00
zvol_id OpenZFS 6314 - buffer overflow in dsl_dataset_name 2016-06-28 13:47:03 -07:00
Makefile.am Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00