mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Persistent L2ARC
This commit makes the L2ARC persistent across reboots. We implement a light-weight persistent L2ARC metadata structure that allows L2ARC contents to be recovered after a reboot. This significantly eases the impact a reboot has on read performance on systems with large caches. Reviewed-by: Matthew Ahrens <mahrens@delphix.com> Reviewed-by: George Wilson <gwilson@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Saso Kiselkov <skiselkov@gmail.com> Co-authored-by: Jorgen Lundman <lundman@lundman.net> Co-authored-by: George Amanakis <gamanakis@gmail.com> Ported-by: Yuxuan Shui <yshuiv7@gmail.com> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes #925 Closes #1823 Closes #2672 Closes #3744 Closes #9582
This commit is contained in:
@@ -4860,6 +4860,8 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport)
|
||||
}
|
||||
|
||||
spa_import_progress_remove(spa_guid(spa));
|
||||
spa_async_request(spa, SPA_ASYNC_L2CACHE_REBUILD);
|
||||
|
||||
spa_load_note(spa, "LOADED");
|
||||
|
||||
return (0);
|
||||
@@ -7985,6 +7987,17 @@ spa_async_thread(void *arg)
|
||||
mutex_exit(&spa_namespace_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Kick off L2 cache rebuilding.
|
||||
*/
|
||||
if (tasks & SPA_ASYNC_L2CACHE_REBUILD) {
|
||||
mutex_enter(&spa_namespace_lock);
|
||||
spa_config_enter(spa, SCL_L2ARC, FTAG, RW_READER);
|
||||
l2arc_spa_rebuild_start(spa);
|
||||
spa_config_exit(spa, SCL_L2ARC, FTAG);
|
||||
mutex_exit(&spa_namespace_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Let the world know that we're done.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user