From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D7F017C224; Tue, 22 Jul 2025 20:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753214549; cv=none; b=HhZVUF+is4Fwwihdmgw74tpOvSrE78+n/+RRItHmZjwfygpy55RrZDRnwik7didL+81sc2HvqCaNyV39DSnKHXe+WVLiSg/AWLITCx0b02/w/qKngK13xiXp5me0sTefANhHIG9x7cMVs+x69QGfhEjeNvqj4XKsjQLtNvcEx6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753214549; c=relaxed/simple; bh=Gsf06oo3Wz1/0XIO6ehWnj+pHlSzYRRg0BlkxiLzl+I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hiyzhLwKJe4OaGXDa7qQKEDl90pCgr9KxK/7nVPmJNUFk+Q2rF4tLvnJhLaTaeW0QhN8wUPtkX2NU0aS48kts8tPPeqDygXyU/OOwpdxf6wSFzuEdkGzrxrkAsFW0yXnmbWzzkrtNaXZQHpIkatC876zgbe0Es3o3MJhdzofsA0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UrtvkEUQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UrtvkEUQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F14CDC4CEEB; Tue, 22 Jul 2025 20:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1753214548; bh=Gsf06oo3Wz1/0XIO6ehWnj+pHlSzYRRg0BlkxiLzl+I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UrtvkEUQOslkCpi6ftZJMf0cTDi81Ok63l0uy5Lgso6U5KDgmphjOUbSu3XBDFx1z 3oIQBIfNuf189fNc/ojDUhEJyRg0q/9CJncaVU+EUiZFEZ2uOXNFYvjar7z4FM7CTo hn1cbcwQif2orZvTOQu0t7guf35018S0GCGuClX9d0FAnraXyyCZlmMMnANczcsLAC LYt3rtJ0knKp25pYLKlLejbHgI6Cqgzgo66u7BN8av6m/Fs/ZbO2DZxUj9ikFI1B62 1Hrkdc2xEwfNg8pYROreEl2qrvLb9mq/Iuv9RhXVqTW3RKrAOO+qV6HSes9K3s7CVW wzNEng8xQ3ODA== Date: Tue, 22 Jul 2025 13:02:25 -0700 From: Eric Biggers To: Christian Brauner Cc: Jeff Layton , Jan Kara , Christoph Hellwig , Jens Axboe , Josef Bacik , "Theodore Y. Ts'o" , linux-fsdevel@vger.kernel.org, linux-fscrypt@vger.kernel.org, fsverity@lists.linux.dev Subject: Re: [PATCH v3 01/13] fs: add fscrypt offset Message-ID: <20250722200225.GA111676@quark> References: <20250722-work-inode-fscrypt-v3-0-bdc1033420a0@kernel.org> <20250722-work-inode-fscrypt-v3-1-bdc1033420a0@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250722-work-inode-fscrypt-v3-1-bdc1033420a0@kernel.org> On Tue, Jul 22, 2025 at 09:27:19PM +0200, Christian Brauner wrote: > Store the offset of the fscrypt data pointer from struct inode in struct > super_operations. Both are embedded in the filesystem's private inode. > > This will allow us to drop the fscrypt data pointer from struct inode > itself and move it into the filesystem's inode. > > Signed-off-by: Christian Brauner > --- > include/linux/fs.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 96c7925a6551..991089969e71 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -2332,6 +2332,7 @@ enum freeze_holder { > }; > > struct super_operations { > + ptrdiff_t i_fscrypt; > struct inode *(*alloc_inode)(struct super_block *sb); > void (*destroy_inode)(struct inode *); > void (*free_inode)(struct inode *); If using inode_operations was ruled out, so we have to go through the super_block to get to an operations struct anyway, wouldn't it make more sense to use fscrypt_operations and fsverity_operations? They are accessible as inode->i_sb->s_cop and inode->i_sb->s_vop. Same number of dereferences as getting to inode->i_sb->s_op. For the naming, how about fscrypt_operations::inode_info_offs and fsverity_operations::inode_info_offs? - Eric