Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4022221pxb; Tue, 17 Nov 2020 09:17:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzkpBfG4NAsTXfu3uKr8o94SuxCmXTYBNNOOKGK5G183F0n3xWGqqSABu7GW7W31+VCi0lB X-Received: by 2002:a17:906:fcdb:: with SMTP id qx27mr20744054ejb.470.1605633421625; Tue, 17 Nov 2020 09:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605633421; cv=none; d=google.com; s=arc-20160816; b=YK+B+KEAigsneEyeJUbDJR9fI7VzLW3tphcurHq9v0bqKrMquQqld+d27daLAI9cC+ TdeNAeDLmQf5Ai6a615h2eTuVpQ3MUWicR/Zk9DnTxLWYqZe18gsAopO24Z/if+9iH1m Qu+5P5HqHyXG3Aa+OKwsuTiZNh7mAJBonaLCuqll32k9ZLJmQrTkz5dXQSHCGbwLc0Lo BHSDdoy9sqv9YQfkADRtqieC0VL64yn0dpEPTYCtiTD6PICzks/ZF67Tpq9g1O0lW4j5 x/w88ph7A5AcKX+lPucF2XUL6T5zW8rufZhqtOQhA/9YdMKAzzDZ4pXufKuz+BHM0597 nQnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Zdh5lewhBVzLnXIlezHPpsXCdaW9+Zml0vPmNW9oRo0=; b=YluomHgCLsH43Goz3zXaWl7P7xtko+F2eEuVCS9gBHXvxBYr4M1Vc01418lF6I5DOe pqphF4fYR40ImwExtmInGlpKeMSLLik0GNACm3O38i2Q/80acYCm4o+j0y/qAHSI7TBA greC1YI8URSe2egsjLhIB0RZ4PcY3hOJUPT+UGwdQyhPBJLyKQ6bqaMlIP7lNrLh5j5X dH8p+CVyknlJGyotg/tpxkOeA+NlC+XuvmZRhLkE7XehNjGUnIDa1lyRJBDde9Dw0ywQ PmIAizGjsjeO/nvSzGIWuq8j1HErLvw9fxEax9Z03ZnzQP3jgIatVsp7j93AMhFRPg/2 1yYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si13049578edj.71.2020.11.17.09.16.08; Tue, 17 Nov 2020 09:17:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729106AbgKQRQA (ORCPT + 99 others); Tue, 17 Nov 2020 12:16:00 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:53457 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727641AbgKQRP7 (ORCPT ); Tue, 17 Nov 2020 12:15:59 -0500 Received: from callcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 0AHHFQSN025997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Nov 2020 12:15:27 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id 611CD420107; Tue, 17 Nov 2020 12:15:26 -0500 (EST) Date: Tue, 17 Nov 2020 12:15:26 -0500 From: "Theodore Y. Ts'o" To: Satya Tangirala Cc: Jaegeuk Kim , Eric Biggers , Chao Yu , Jens Axboe , "Darrick J . Wong" , linux-kernel@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-block@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [PATCH v7 0/8] add support for direct I/O with fscrypt using blk-crypto Message-ID: <20201117171526.GD445084@mit.edu> References: <20201117140708.1068688-1-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117140708.1068688-1-satyat@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org What is the expected use case for Direct I/O using fscrypt? This isn't a problem which is unique to fscrypt, but one of the really unfortunate aspects of the DIO interface is the silent fallback to buffered I/O. We've lived with this because DIO goes back decades, and the original use case was to keep enterprise databases happy, and the rules around what is necessary for DIO to work was relatively well understood. But with fscrypt, there's going to be some additional requirements (e.g., using inline crypto) required or else DIO silently fall back to buffered I/O for encrypted files. Depending on the intended use case of DIO with fscrypt, this caveat might or might not be unfortunately surprising for applications. I wonder if we should have some kind of interface so we can more explicitly allow applications to query exactly what the requirements might be for a particular file vis-a-vis Direct I/O. What are the memory alignment requirements, what are the file offset alignment requirements, what are the write size requirements, for a particular file. - Ted