Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4292950ybl; Tue, 20 Aug 2019 09:42:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVpYE7WPgjenuyt+dtKCDJIy6ujyhRQtdSq5rJUUvuW9KP+Thq0fCucpCKPM6cc2kEKDL2 X-Received: by 2002:a63:cb4b:: with SMTP id m11mr26180938pgi.49.1566319341893; Tue, 20 Aug 2019 09:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566319341; cv=none; d=google.com; s=arc-20160816; b=Pho/KUe+MF5CNvmdcV5J3YM8evpP4h0PfRmxtxuXFNQgCY15pHzA1Y4U0GSO+8tgws /qxxdZjfmJPL5kZxOL6t97DjUMUBHgUOYmh2HcKS9qQqeztpW2vp93uXV8uF6oFj28SH Sz6igIsxFibjhZ1befMmyfIcyw9l9uVxex2u7/onxxcSh6qyyjCOFflyg66f9WtWTVwQ R5siSKsFyO84L2J9ytMo6lpd6LtHXTUYoI5j/atx1kpwBQmXszEZ3Z8tRLHdTm+nhhdv EHH4/dGn2hGtaNIFxhn0qiBKa8A9ZoMKfiuQeEW8KxeSxTG/R+APptaY7aKSWg1rhYkD EL/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=onBTP92XmzoSw0uJfNa+XH9A9VLRv0aIT28vfGRmLHU=; b=Q3SCyfXuqPD3T7aabXxl0oCx1pLBzDXSpAmcvBerK5ISpTd8DrM9Xo+7Ot7LpDizgu rQJXFbUf0o3ChtJjkiLqFPJsFPQZYFkmIuOJ1DVnuVEb8azveLBEIzoogLawA7341OjF D4G5T55Olc4rN+HhB5SZq4Ych8BhEQoQkeAmJxCiQK2pCUlfcp3nODTQAa/N0EoV6jOn EDoO5fYxtlvj/2XYx5gvYrboSlxE9pN+Pj1hFRnBR1xLV0m6SraJXAC6PmTrP0Hv/OnM NAYReb7iTw78OUGeolQFMkqtXxTUosyGlvTPhD0iwZEM/t9HQ7wHwJw13hefVJ7II/MG nSwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si310900pjv.24.2019.08.20.09.42.04; Tue, 20 Aug 2019 09:42:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728554AbfHTQl7 (ORCPT + 99 others); Tue, 20 Aug 2019 12:41:59 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33012 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727077AbfHTQl7 (ORCPT ); Tue, 20 Aug 2019 12:41:59 -0400 Received: from callcc.thunk.org (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7KGcboC007051 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Aug 2019 12:38:39 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 4B96E420843; Tue, 20 Aug 2019 12:38:37 -0400 (EDT) Date: Tue, 20 Aug 2019 12:38:37 -0400 From: "Theodore Y. Ts'o" To: Chandan Rajendra Cc: ebiggers@kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, chandanrmail@gmail.com, adilger.kernel@dilger.ca, jaegeuk@kernel.org, yuchao0@huawei.com, hch@infradead.org Subject: Re: [PATCH V4 5/8] f2fs: Use read_callbacks for decrypting file data Message-ID: <20190820163837.GD10232@mit.edu> References: <20190816061804.14840-1-chandan@linux.ibm.com> <20190816061804.14840-6-chandan@linux.ibm.com> <1652707.8YmLLlegLt@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652707.8YmLLlegLt@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Aug 20, 2019 at 10:35:29AM +0530, Chandan Rajendra wrote: > Looks like F2FS requires a lot more flexiblity than what can be offered by > read callbacks i.e. > > 1. F2FS wants to make use of its own workqueue for decryption, verity and > decompression. > 2. F2FS' decompression code is not an FS independent entity like fscrypt and > fsverity. Hence they would need Filesystem specific callback functions to > be invoked from "read callbacks". > > Hence I would suggest that we should drop F2FS changes made in this > patchset. Please let me know your thoughts on this. That's probably the best way to go for now. My one concern is that it means that only ext4 will be using your framework. I could imagine that some people might argue that should just move the callback scheme into ext4 code as opposed to leaving it in fscrypt --- at least until we can find other file systems where we can show that it will be useful for those other file systems. (Perhaps a useful experiment would be to have someone implement patches to support fscrypt and fsverity in ext2 --- the patch might or might not be accepted for upstream inclusion, but it would be useful to demonstrate how easy it is to add fscrypt and fsverity.) The other thing to consider is that there has been some discussion about adding generalized support for I/O submission to the iomap library. It might be that if that work is accepted, support for fscrypt and fsverity would be a requirement for ext4 to use that portion of iomap's functionality. So in that eventuality, it might be that we'll want to move your read callbacks code into iomap, or we'll need to rework the read callbacks code so it can work with iomap. But this is all work for the future. I'm a firm believe that the perfect should not be the enemy of the good, and that none of this should be a fundamental obstacle in having your code upstream. Cheers, - Ted