summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-01-29 13:53:38 +1030
committerDavid Sterba <dsterba@suse.com>2026-02-03 07:59:06 +0100
commit3be8a788eed3f7f30f32d69f50d648ba2c458f21 (patch)
tree3b852bcd3e28460dc3d2d683184f206623f8a61b /include/uapi
parente8f6130419d7a8b1384135a9e23d008c3fc01dad (diff)
btrfs: lzo: introduce lzo_compress_bio() helper
The new helper has the following enhancements against the existing lzo_compress_folios() - Much smaller parameter list No more shared IN/OUT members, no need to pre-allocate a compressed_folios[] array. Just a workspace list header and a compressed_bio pointer. Everything else can be fetched from that @cb pointer. - Read-to-be-submitted compressed bio Although the caller still needs to do some common works like rounding up and zeroing the tailing part of the last fs block. Some workloads are specific to lZO that is not needed with other multi-run compression interfaces: - Need to write a LZO header or segment header Use the new write_and_queue_folio() helper to do the bio_add_folio() call and folio switching. - Need to update the LZO header after compression is done Use bio_first_folio_all() to grab the first folio and update the header. - Extra corner case of error handling This can happen when we have queued part of a folio and hit an error. In that case those folios will be released by the bio. Thus we can only release the folio that has no queued part. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions