]> git.proxmox.com Git - mirror_zfs.git/commit - module/zfs/spa.c
predictive prefetch disabled on new pools until export/reboot
authorMatthew Ahrens <mahrens@delphix.com>
Fri, 5 Apr 2019 17:12:02 +0000 (10:12 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Apr 2019 17:12:02 +0000 (10:12 -0700)
commit944a37248a0db8a3f8c5aee3864d9857a3486672
tree366b0904de73c3f058978977eae4dd059a183b69
parentb4ddec7af6cc52afc54797b4bd3a5f7b29eab52e
predictive prefetch disabled on new pools until export/reboot

When a pool is initially created (by `zpool create`), predictive
prefetch is inadvertently disabled, until the pool is export/import-ed,
or the machine is rebooted.

When device removal was introduced, we added some code to disable
predictive prefetching until indirect vdevs have been loaded.  This
resulted in the "default state" of prefetch being disabled, until we
proactively enable it after indirect vdevs are loaded.  Unfortunately
this resulted in a few bugs where in some code paths we neglect to
enable predictive prefetch.  The first of these was fixed by
https://github.com/zfsonlinux/zfs/commit/20507534d4ede14d4dd82c99fc8d461704ce7419

This commit fixes another case where we also need to explicitly enable
predictive prefetch, when the pool is initially created.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #8577
module/zfs/spa.c