Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp12151pxb; Tue, 17 Nov 2020 18:39:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwj/j7QKzRZ/B6qRPSDIxI4Bf7wWgybZg20LFwwZ/hhk1sHtQb68l0ZN15PKEelbjiuMQc X-Received: by 2002:a17:906:3bc9:: with SMTP id v9mr4717552ejf.69.1605667196729; Tue, 17 Nov 2020 18:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605667196; cv=none; d=google.com; s=arc-20160816; b=IajPStlhOV1xBMCBuB7pUfjY36mhpSTRZCuCMTrdWRmm5iYKgR87x1eJyuX89lawPP 8PQnw0hTVliI5f82hGZ6tBWe8IBxaQbYNiB+y3NSBfXx/iXMGLdet1rTpIt6jnC55lpd fcc2osSxfAyohbHIThr+Fjts9TIlPQr1adD+O7HLwFuL1aU3E16GNS9giwmEqu1Kxc8r 5KEPht3YSrbWAMX4CnPOs3uxckfF41L14ABqCcNZXNsF/MP1vm9ntvTaOc/S1YdQZe3b JRA70rcZQTrHZ7Cpis74WUF2qKTXl8kOtDqRRKhO87gcMc14Sp1naUxKANOHLyedPaEw z4ww== 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:dkim-signature; bh=0xBS4bl1HG6FHMZyBv854rnwnYW4g9JK5pyX1iZXkXQ=; b=m+lEHX7LKCClPnO+HdzzmKZ9wai3IfxkwbJg7qx6iE8/jBTSso5CXw4oIIglYBTcOY Y7ezSmedzoq+lxP5BzTLTTgq7KPC76LMgR5vYz+szMgsA0BS3P0baZeUHxD2ukrV77Ke ccQH3ed8l6/kPFEMZlTAd/ZT7IXzVV2fHbtE9D6IkhUazj793bgNZsQMKjVWVZDh9qzW Yf1Ik6UFY66w3hlhr6yYNRAFkn9+w8vIoKSv2yko1wzJ3zQ4s4EN/tM+hBbxE3Buj2ZH CMJYm7R86coZrZvKt7SqFa70hOqKj19qVTNUzpTi6GukJ0i627swm4p6MfYGJuNEr/Z9 9Kjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CcVCAHnf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si15336257edn.551.2020.11.17.18.39.23; Tue, 17 Nov 2020 18:39:56 -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; dkim=pass header.i=@kernel.org header.s=default header.b=CcVCAHnf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725790AbgKRCid (ORCPT + 99 others); Tue, 17 Nov 2020 21:38:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:51716 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725771AbgKRCid (ORCPT ); Tue, 17 Nov 2020 21:38:33 -0500 Received: from sol.localdomain (172-10-235-113.lightspeed.sntcca.sbcglobal.net [172.10.235.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7974820DD4; Wed, 18 Nov 2020 02:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605667112; bh=0xBS4bl1HG6FHMZyBv854rnwnYW4g9JK5pyX1iZXkXQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CcVCAHnfikOI7obL4iDkX+pvxV6BkoVhq3i/nMv2YQGL3dWvNP1JNTF5fTrtwpN93 f73dmtTBLP6+ftYAdEFbfMbYoah6meAKGR7YgEn/KW+Ly6WbpnJD6yQ/YU4YuTsvDG n9jx4eTxwSArJUNexi06Kz57cAZar0eTEOVpb7nY= Date: Tue, 17 Nov 2020 18:38:30 -0800 From: Eric Biggers To: Satya Tangirala Cc: "Theodore Y . Ts'o" , Jaegeuk Kim , 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 8/8] fscrypt: update documentation for direct I/O support Message-ID: References: <20201117140708.1068688-1-satyat@google.com> <20201117140708.1068688-9-satyat@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117140708.1068688-9-satyat@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Nov 17, 2020 at 02:07:08PM +0000, Satya Tangirala wrote: > +Direct I/O support > +================== > + > +Direct I/O on encrypted files is supported through blk-crypto. In > +particular, this means the kernel must have CONFIG_BLK_INLINE_ENCRYPTION > +enabled, the filesystem must have had the 'inlinecrypt' mount option > +specified, and either hardware inline encryption must be present, or > +CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK must have been enabled. Further, > +the length of any I/O must be aligned to the filesystem block size > +(*not* necessarily the same as the block device's block size). If any of > +these conditions isn't met, attempts to do direct I/O on an encrypted file > +will fall back to buffered I/O. However, there aren't any additional > +requirements on user buffer alignment (apart from those already present > +when using direct I/O on unencrypted files). Actually the position in the file the I/O is targeting must be fs-block aligned too, not just the length of the I/O. It's only the pointer to the user data buffer that no longer needs to be fs-block aligned (this changed between v6 and v7). - Eric