From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Johannes Thumshirn <jthumshirn@suse.de>, David Sterba <dsterba@suse.com>
Cc: Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC PATCH 3/4] btrfs: use xxhash64 for checksumming
Date: Thu, 25 Jul 2019 20:02:12 +0800 [thread overview]
Message-ID: <c2f5e995-6edf-991a-51a6-2c7ba43df41b@gmx.com> (raw)
In-Reply-To: <4ac3332af1fa5ba7ecb92181329151382b800f3d.1564046812.git.jthumshirn@suse.de>
[-- Attachment #1.1: Type: text/plain, Size: 2407 bytes --]
On 2019/7/25 下午5:33, Johannes Thumshirn wrote:
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> ---
> fs/btrfs/Kconfig | 1 +
> fs/btrfs/ctree.h | 1 +
> fs/btrfs/disk-io.c | 1 +
> fs/btrfs/super.c | 1 +
> include/uapi/linux/btrfs_tree.h | 1 +
> 5 files changed, 5 insertions(+)
>
> diff --git a/fs/btrfs/Kconfig b/fs/btrfs/Kconfig
> index 38651fae7f21..6d5a01c57da3 100644
> --- a/fs/btrfs/Kconfig
> +++ b/fs/btrfs/Kconfig
> @@ -5,6 +5,7 @@ config BTRFS_FS
> select CRYPTO
> select CRYPTO_CRC32C
> select LIBCRC32C
> + select CRYPTO_XXHASH
Just an off topic idea, can we make such CRYPTO_* support configurable?
E.g. make something like CONFIG_BTRFS_CRYPTO_XXHASH.
Not sure if everyone would like to pull all hash algorithm.
Thanks,
Qu
> select ZLIB_INFLATE
> select ZLIB_DEFLATE
> select LZO_COMPRESS
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 099401f5dd47..b34f22e55304 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -90,6 +90,7 @@ static const struct btrfs_csums {
> const char *name;
> } btrfs_csums[] = {
> BTRFS_CHECKSUM_TYPE(BTRFS_CSUM_TYPE_CRC32, 4, "crc32c"),
> + BTRFS_CHECKSUM_TYPE(BTRFS_CSUM_TYPE_XXHASH, 8, "xxhash64"),
> };
>
> #define BTRFS_EMPTY_DIR_SIZE 0
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 5f7ee70b3d1a..54a8ef489850 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -351,6 +351,7 @@ static bool btrfs_supported_super_csum(u16 csum_type)
> {
> switch (csum_type) {
> case BTRFS_CSUM_TYPE_CRC32:
> + case BTRFS_CSUM_TYPE_XXHASH:
> return true;
> default:
> return false;
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 78de9d5d80c6..7312f675d702 100644
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -2464,3 +2464,4 @@ module_exit(exit_btrfs_fs)
>
> MODULE_LICENSE("GPL");
> MODULE_SOFTDEP("pre: crc32c");
> +MODULE_SOFTDEP("pre: xxhash64");
> diff --git a/include/uapi/linux/btrfs_tree.h b/include/uapi/linux/btrfs_tree.h
> index babef98181a2..af4f5dec10b7 100644
> --- a/include/uapi/linux/btrfs_tree.h
> +++ b/include/uapi/linux/btrfs_tree.h
> @@ -302,6 +302,7 @@
> /* csum types */
> enum btrfs_csum_type {
> BTRFS_CSUM_TYPE_CRC32 = 0,
> + BTRFS_CSUM_TYPE_XXHASH = 1,
> };
>
> /*
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2019-07-25 12:02 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 9:33 [RFC PATCH 0/4] Support xxhash64 checksums Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 1/4] btrfs: turn checksum type define into a union Johannes Thumshirn
2019-07-25 11:08 ` Mike Fleetwood
2019-07-25 11:21 ` Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 2/4] btrfs: create structure to encode checksum type and length Johannes Thumshirn
2019-07-26 3:09 ` Su Yue
2019-07-30 17:25 ` David Sterba
2019-08-12 9:07 ` Nikolay Borisov
2019-08-19 9:15 ` Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 3/4] btrfs: use xxhash64 for checksumming Johannes Thumshirn
2019-07-25 12:02 ` Qu Wenruo [this message]
2019-07-25 14:18 ` Johannes Thumshirn
2019-07-26 13:45 ` David Sterba
2019-07-25 9:33 ` [RFC PATCH 4/4] btrfs: sysfs: export supported checksums Johannes Thumshirn
2019-07-30 17:19 ` David Sterba
2019-07-31 8:06 ` Johannes Thumshirn
2019-08-07 14:10 ` Johannes Thumshirn
2019-08-21 16:19 ` David Sterba
2019-08-12 9:19 ` Nikolay Borisov
2019-08-19 9:15 ` Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 05/17] btrfs-progs: add option for checksum type to mkfs Johannes Thumshirn
2019-07-30 17:36 ` David Sterba
2019-08-12 9:30 ` Nikolay Borisov
2019-07-25 9:33 ` [RFC PATCH 06/17] btrfs-progs: don't blindly assume crc32c in csum_tree_block_size() Johannes Thumshirn
2019-08-12 9:49 ` Nikolay Borisov
2019-07-25 9:33 ` [RFC PATCH 07/17] btrfs-progs: use btrfs_csum_data() in __csum_tree_block_size() Johannes Thumshirn
2019-07-30 17:37 ` David Sterba
2019-07-25 9:33 ` [RFC PATCH 08/17] btrfs-progs: cache csum_type in recover_control Johannes Thumshirn
2019-08-12 9:52 ` Nikolay Borisov
2019-07-25 9:33 ` [RFC PATCH 09/17] progs: pass in a btrfs_mkfs_config to write_temp_extent_buffer Johannes Thumshirn
2019-07-30 17:38 ` David Sterba
2019-08-12 9:56 ` Nikolay Borisov
2019-07-25 9:33 ` [RFC PATCH 10/17] btrfs-progs: add checksum type to checksumming functions Johannes Thumshirn
2019-08-12 10:21 ` Nikolay Borisov
2019-08-26 9:34 ` Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 11/17] btrfs-progs: don't assume checksums are always 4 bytes Johannes Thumshirn
2019-07-25 9:33 ` [RFC PATCH 12/17] btrfs-progs: pass checksum type to btrfs_csum_data() Johannes Thumshirn
2019-08-12 10:51 ` Nikolay Borisov
2019-08-20 9:12 ` Johannes Thumshirn
2019-07-25 9:34 ` [RFC PATCH 13/17] " Johannes Thumshirn
2019-07-25 9:34 ` [RFC PATCH 14/17] btrfs-progs: simplify update_block_csum() in btrfs-sb-mod.c Johannes Thumshirn
2019-08-12 10:53 ` Nikolay Borisov
2019-07-25 9:34 ` [RFC PATCH 15/17] btrfs-progs: update checksumming api Johannes Thumshirn
2019-07-25 9:34 ` [RFC PATCH 16/17] btrfs-progs: add xxhash sources Johannes Thumshirn
2019-07-25 9:34 ` [RFC PATCH 17/17] btrfs-progs: add xxhash64 as checksum algorithm Johannes Thumshirn
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=c2f5e995-6edf-991a-51a6-2c7ba43df41b@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=dsterba@suse.com \
--cc=jthumshirn@suse.de \
--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).