Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: dsterba@suse.cz, David Sterba <dsterba@suse.com>,
	Linux BTRFS Mailinglist <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2 01/11] btrfs-progs: don't blindly assume crc32c in csum_tree_block_size()
Date: Wed, 28 Aug 2019 09:48:42 +0200	[thread overview]
Message-ID: <368ea9b7-7c21-2565-0b17-6a8e504fcf8d@suse.de> (raw)
In-Reply-To: <20190827163638.GV2752@twin.jikos.cz>

On 27/08/2019 18:36, David Sterba wrote:
> On Tue, Aug 27, 2019 at 06:33:02PM +0200, David Sterba wrote:
>> On Mon, Aug 26, 2019 at 01:48:43PM +0200, Johannes Thumshirn wrote:
>>> The callers of csum_tree_block_size() blindly assume we're only having
>>> crc32c as a possible checksum and thus pass in
>>> btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32] for the size argument of
>>> csum_tree_block_size().
>>>
>>> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
>>> Reviewed-by: Nikolay Borisov <nborisov@suse.com>
>>> ---
>>>  mkfs/common.c | 14 +++++++-------
>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/mkfs/common.c b/mkfs/common.c
>>> index caca5e707233..b6e549b19272 100644
>>> --- a/mkfs/common.c
>>> +++ b/mkfs/common.c
>>> @@ -101,7 +101,7 @@ static int btrfs_create_tree_root(int fd, struct btrfs_mkfs_config *cfg,
>>>  	}
>>>  
>>>  	/* generate checksum */
>>> -	csum_tree_block_size(buf, btrfs_csum_sizes[BTRFS_CSUM_TYPE_CRC32], 0);
>>> +	csum_tree_block_size(buf, btrfs_csum_sizes[cfg->csum_type], 0);
>>
>> Where is btrfs_mkfs_config::csum_type defined?
> 
> Aha it's in 8/11.

Grr, more artifacts of rebasing/reorganizing the series.

Sorry for that.

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@suse.de                                +49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 247165, AG München)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

  reply	other threads:[~2019-08-28  7:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 11:48 [PATCH v2 00/11] btrfs-progs: support xxhash64 checksums Johannes Thumshirn
2019-08-26 11:48 ` [PATCH v2 01/11] btrfs-progs: don't blindly assume crc32c in csum_tree_block_size() Johannes Thumshirn
2019-08-27 16:33   ` David Sterba
2019-08-27 16:36     ` David Sterba
2019-08-28  7:48       ` Johannes Thumshirn [this message]
2019-08-26 11:48 ` [PATCH v2 02/11] btrfs-progs: cache csum_type in recover_control Johannes Thumshirn
2019-08-26 11:48 ` [PATCH v2 03/11] btrfs-progs: add checksum type to checksumming functions Johannes Thumshirn
2019-08-27 12:51   ` Nikolay Borisov
2019-08-26 11:48 ` [PATCH v2 04/11] btrfs-progs: don't assume checksums are always 4 bytes Johannes Thumshirn
2019-08-27 12:52   ` Nikolay Borisov
2019-08-26 11:48 ` [PATCH v2 05/11] btrfs-progs: pass checksum type to btrfs_csum_data()/btrfs_csum_final() Johannes Thumshirn
2019-08-27 12:53   ` Nikolay Borisov
2019-08-26 11:48 ` [PATCH v2 06/11] btrfs-progs: simplify update_block_csum() in btrfs-sb-mod.c Johannes Thumshirn
2019-08-26 11:48 ` [PATCH v2 07/11] btrfs-progs: update checksumming api Johannes Thumshirn
2019-08-26 11:48 ` [PATCH v2 08/11] btrfs-progs: add option for checksum type to mkfs Johannes Thumshirn
2019-08-27 13:03   ` Nikolay Borisov
2019-08-26 11:48 ` [PATCH v2 09/11] btrfs-progs: add xxhash sources Johannes Thumshirn
2019-08-27 13:05   ` Nikolay Borisov
2019-08-27 16:20     ` David Sterba
2019-08-26 11:48 ` [PATCH v2 10/11] btrfs-progs: add xxhash64 as checksum algorithm Johannes Thumshirn
2019-08-27 14:16   ` Nikolay Borisov
2019-08-27 16:12     ` David Sterba
2019-08-30  9:33     ` Johannes Thumshirn
2019-08-26 11:48 ` [PATCH v2 11/11] btrfs-progs: add test-case for mkfs with xxhash64 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=368ea9b7-7c21-2565-0b17-6a8e504fcf8d@suse.de \
    --to=jthumshirn@suse.de \
    --cc=dsterba@suse.com \
    --cc=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