Skip to content
Snippets Groups Projects
Commit 1b354a72 authored by Gleb Natapov's avatar Gleb Natapov Committed by Pekka Enberg
Browse files

pagecache, zfs: make hole detection logic more efficient


Instead of searching for next data offset in a file before getting ARC
buffer this patch adds dmu_buf_hold_array_sparse() function which is variant
of dmu_buf_hold_array() but it returns an error if requested offset
belongs to a hole. This reduces amount of locks taken and avoids file
syncing that dmu_offset_next() does.

Reviewed-by: default avatarGlauber Costa <glommer@cloudius-systems.com>
Signed-off-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent 73494e42
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment