From: David Sterba <dsterba@suse.cz>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.cz>
Subject: [PATCH 3/4] btrfs: lz4: add wrapper for context size estimation
Date: Mon, 13 Feb 2012 20:05:36 +0100 [thread overview]
Message-ID: <1329159937-23976-3-git-send-email-dsterba@suse.cz> (raw)
In-Reply-To: <1329159937-23976-1-git-send-email-dsterba@suse.cz>
Currently 16K for 32bit and 64bit.
Signed-off-by: David Sterba <dsterba@suse.cz>
---
fs/btrfs/lz4.c | 9 +++++++++
fs/btrfs/lz4.h | 3 +++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/lz4.c b/fs/btrfs/lz4.c
index e41d0cf..105ea9c 100644
--- a/fs/btrfs/lz4.c
+++ b/fs/btrfs/lz4.c
@@ -808,3 +808,12 @@ _output_error:
return (int) (-(((char*)ip)-source));
}
+int LZ4_context_size(void)
+{
+ return sizeof(struct refTables);
+}
+int LZ4_context64k_size(void)
+{
+ return sizeof(struct refTables);
+}
+
diff --git a/fs/btrfs/lz4.h b/fs/btrfs/lz4.h
index bbd5e12..b0f8cc7 100644
--- a/fs/btrfs/lz4.h
+++ b/fs/btrfs/lz4.h
@@ -102,6 +102,9 @@ int LZ4_compress64kCtx(void** ctx,
char* dest,
int isize);
+int LZ4_context_size(void);
+int LZ4_context64k_size(void);
+
#if defined (__cplusplus)
}
#endif
--
1.7.8
next prev parent reply other threads:[~2012-02-13 19:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-13 19:03 [RFB] add LZ4 compression method to btrfs David Sterba
2012-02-13 19:05 ` [PATCH 1/4] btrfs: prepare incompat flags for more compression methods David Sterba
2012-02-13 19:05 ` [PATCH 2/4] btrfs: add LZ4 compression method David Sterba
2012-02-13 19:05 ` David Sterba [this message]
2012-02-13 19:05 ` [PATCH 4/4] btrfs: lz4: add wrapper functions and enable it David Sterba
2012-02-14 20:44 ` [RFB] add LZ4 compression method to btrfs Markus Lindberg
2012-02-14 21:13 ` Andi Kleen
2012-02-14 21:47 ` Hugo Chevrain
2012-02-15 17:23 ` Kok, Auke-jan H
2012-02-15 17:35 ` Fahrzin Hemmati
2012-02-16 13:07 ` Hugo Chevrain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1329159937-23976-3-git-send-email-dsterba@suse.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).