From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751173AbdEaT7z (ORCPT ); Wed, 31 May 2017 15:59:55 -0400 Received: from mail-it0-f44.google.com ([209.85.214.44]:38311 "EHLO mail-it0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbdEaT7x (ORCPT ); Wed, 31 May 2017 15:59:53 -0400 MIME-Version: 1.0 In-Reply-To: <20170531164236.GJ4510@birch.djwong.org> References: <20170531081517.11438-1-tahsin@google.com> <20170531164236.GJ4510@birch.djwong.org> From: Tahsin Erdogan Date: Wed, 31 May 2017 12:59:51 -0700 Message-ID: Subject: Re: [PATCH 01/28] ext4: xattr-in-inode support To: "Darrick J. Wong" 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, Andreas Dilger , Kalpak Shah , James Simmons Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> allowing the ext4/e2fsck to verify the correct inode is accessed. > > Can we store the checksum of the xattr value somewhere? We already > checksum the values if they're stored in the ibody or a single external > block, and I'd hate to lose that protection. > > We could probably reuse one of the inode fields (i_version?) for this. > The crc32c value of the xattr data is currently stored in the xattr inode: struct ext4_xattr_ea_info { __le64 ref_count; /* number of xattr entry references */ __le32 hash; /* crc32c hash of xattr data */ __le32 reserved; /* reserved, must be 0 */ }; We could also save that value in the ext4_xattr_entry->e_value_offs for stronger binding between parent and xattr inodes. That field is currently set to 0 for xattr inode references.