Skip to content

Parameter reduction in compression wrappers

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5btrfs: merge length input and output parameter in compress_pagesfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/inode.c +2 more+18 -200 replies
2/5btrfs: merge nr_pages input and output parameter in compress_pagesfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/inode.c +2 more+11 -150 replies
3/5btrfs: export compression buffer limits in a headerfs/btrfs/compression.h fs/btrfs/inode.c+15 -101 reply
4/5btrfs: use predefined limits for calculating maximum number of pages for compressionfs/btrfs/inode.c+6 -50 replies
5/5btrfs: derive maximum output size in the compression implementationfs/btrfs/compression.c fs/btrfs/compression.h fs/btrfs/inode.c +2 more+9 -140 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchQu Wenruo
1/5
2/5
3/5R-b
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] Parameter reduction in compression wrappers

I've noticed that some of the parameters passed to compress_pages are redundant and that we can either reuse a parameter for both input and output value (number of pages) or we can infer some value from the existing parameters (the maximum output limit).

There's no functional change, the stack consumption is slightly smaller.

David Sterba (5):
btrfs: merge length input and output parameter in compress_pages
btrfs: merge nr_pages input and output parameter in compress_pages
btrfs: export compression buffer limits in a header
btrfs: use predefined limits for calculating maximum number of pages for compression
btrfs: derive maximum output size in the compression implementation

 fs/btrfs/compression.c | 33 ++++++++++++++-------------------
 fs/btrfs/compression.h | 28 +++++++++++++++++++---------
 fs/btrfs/inode.c       | 37 +++++++++++++------------------------
 fs/btrfs/lzo.c         | 10 +++++-----
 fs/btrfs/zlib.c        |  9 +++++----
 5 files changed, 56 insertions(+), 61 deletions(-)