From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751288AbdFBSAv (ORCPT ); Fri, 2 Jun 2017 14:00:51 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:33350 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbdFBSAs (ORCPT ); Fri, 2 Jun 2017 14:00:48 -0400 Date: Fri, 2 Jun 2017 10:59:35 -0700 From: "Darrick J. Wong" To: Tahsin Erdogan Cc: Jan Kara , "Theodore Ts'o" , Andreas Dilger , Dave Kleikamp , Alexander Viro , Mark Fasheh , Joel Becker , Jens Axboe , Deepa Dinamani , Mike Christie , Fabian Frederick , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org Subject: Re: [PATCH v2 27/28] ext4: xattr inode deduplication Message-ID: <20170602175935.GB5626@birch.djwong.org> References: <20170531160004.GG4510@birch.djwong.org> <20170531223357.800-1-tahsin@google.com> <20170602054143.GA5626@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 02, 2017 at 05:46:22AM -0700, Tahsin Erdogan wrote: > > Hmm... normally we'd supply sbi->s_csum_seed as the second argument so > > that the metadata checksum value also has the fs uuid stamped into it. > > I have thought about using sbi->s_csum_seed and was a little hesitant > because it involves adding more complexity to e2fsprogs to handle > cases like changing uuid or turning off metadata_csum. After thinking > more about this, I think it is doable. e2fsprogs already has code to walk the fs to rewrite/remove checksums, so it shouldn't be too much effort to tap into that to rewrite the ea_info hash. > > Even if you dismiss that, we usually follow the convention of > > initializing the crc32c calculation with (~0U), not (0U), to strengthen > > crc32c's ability to detect zeroes being injected at the start of the > > stream. > > Agreed, using ~0 is definitely better than 0. --D