diff options
author | Alexander Motin <[email protected]> | 2021-07-27 19:05:47 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-27 16:05:47 -0700 |
commit | 7eebcd2be6ac91a1c28ed6a2184efb81aa9aa2a4 (patch) | |
tree | 841a24b362c0da167803ac6205242c8b9292b752 /include | |
parent | b72611f0f612bf9ffeda827ea0bdf4cc36d9c6e4 (diff) |
Avoid small buffer copying on write
It is wrong for arc_write_ready() to use zfs_abd_scatter_enabled to
decide whether to reallocate/copy the buffer, because the answer is
OS-specific and depends on the buffer size. Instead of that use
abd_size_alloc_linear(), moved into public header.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Brian Atkinson <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Closes #12425
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/abd.h | 1 | ||||
-rw-r--r-- | include/sys/abd_impl.h | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/abd.h b/include/sys/abd.h index 6903e0c0e..5c6bd0c27 100644 --- a/include/sys/abd.h +++ b/include/sys/abd.h @@ -91,6 +91,7 @@ abd_t *abd_alloc_linear(size_t, boolean_t); abd_t *abd_alloc_gang(void); abd_t *abd_alloc_for_io(size_t, boolean_t); abd_t *abd_alloc_sametype(abd_t *, size_t); +boolean_t abd_size_alloc_linear(size_t); void abd_gang_add(abd_t *, abd_t *, boolean_t); void abd_free(abd_t *); abd_t *abd_get_offset(abd_t *, size_t); diff --git a/include/sys/abd_impl.h b/include/sys/abd_impl.h index 113700cd7..e96f1edfc 100644 --- a/include/sys/abd_impl.h +++ b/include/sys/abd_impl.h @@ -68,7 +68,6 @@ abd_t *abd_get_offset_scatter(abd_t *, abd_t *, size_t, size_t); void abd_free_struct_impl(abd_t *); void abd_alloc_chunks(abd_t *, size_t); void abd_free_chunks(abd_t *); -boolean_t abd_size_alloc_linear(size_t); void abd_update_scatter_stats(abd_t *, abd_stats_op_t); void abd_update_linear_stats(abd_t *, abd_stats_op_t); void abd_verify_scatter(abd_t *); |