diff options
author | Simon Rettberg | 2020-08-05 11:37:55 +0200 |
---|---|---|
committer | Simon Rettberg | 2020-08-05 11:37:55 +0200 |
commit | d80110c71f15abce3a4d7d87550b05a0baf35120 (patch) | |
tree | 6ebf3f3cdf409eb6440ebadc3943fbb87062277a /loop_file_fmt_qcow_main.h | |
parent | Change loop%d strings to xloop%d (diff) | |
download | xloop-d80110c71f15abce3a4d7d87550b05a0baf35120.tar.gz xloop-d80110c71f15abce3a4d7d87550b05a0baf35120.tar.xz xloop-d80110c71f15abce3a4d7d87550b05a0baf35120.zip |
Cache last decompressed cluster for compressed QCOW
The naive implementation repeatedly decompressed the same cluster for
every 4k read, which was incredibly wasteful and resulted in ~20MB/s read
speeds if the underlying qcow2 was read via GBit network.
This approach yields 200MB/s+
Diffstat (limited to 'loop_file_fmt_qcow_main.h')
-rw-r--r-- | loop_file_fmt_qcow_main.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/loop_file_fmt_qcow_main.h b/loop_file_fmt_qcow_main.h index 9e4951f..dd6ed30 100644 --- a/loop_file_fmt_qcow_main.h +++ b/loop_file_fmt_qcow_main.h @@ -238,6 +238,8 @@ struct loop_file_fmt_qcow_data { u64 autoclear_features; struct z_stream_s *strm; + u8 *cmp_out_buf; + u64 cmp_last_coffset; /* debugfs entries */ #ifdef CONFIG_DEBUG_FS |