Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4027916pxb; Tue, 17 Nov 2020 09:25:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxq2Ogw/36zUljaBbalmty2xoU5XmKyjQs4Gjd2yghpGHz4oF/M/W7iCQa3enC3MWhOJs8L X-Received: by 2002:a50:f0d4:: with SMTP id a20mr21913347edm.303.1605633906514; Tue, 17 Nov 2020 09:25:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605633906; cv=none; d=google.com; s=arc-20160816; b=zAzuKYksabAgKtoNroXkDPdbahyi7KaLH/jI4gmDiIzQngXVKzWsAnmfWjqrl3Dmbz xuiGvhodVeTXynmjcspzP6wAYe3MPW8dOS5omRAKXtID3M08Oxk3a0Y7JmmgbxF2bc3o VrdoQEzcNBzh6xLfiCrSech3/2ZIkhZnLybhUvmOUbTenUTG4ps8vxZHvDtKy8E4KCig Qrlp/VnK+23jctRC7rEiX7TU+tN1l+roqKDuHzhJYpMP03yKJKUi1/8tDJhFSaZhGLpN rUjnjFB4DaKzST1J2/0FD4mFx7anmcZAojfk+6VTXsB8YqVHlgktW7rRbD2k0TLXKvD5 3BJw== 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=lCI0j81S3i0woS5Vx28EWN/Xr3iRPfZ2DQ1EVZE5Cgs=; b=vP1pZaw/wmOCPm47SOEDTnjIJ+3z24v+mM+h31JjPK8cu5w5duczaHICZihVEKEu4W xEJMOHY32Tk7qtiOGbuXWrPhCAgWHGuYPkxvQjc53f/j7foycNqvnRJpIbezWwvaITOt XS84goBZ16pO9tijvQ/dWjLq4Hmx1+E/X409+PbrYloglJBnsKCg0jhG4r2FrauNaufk lzWkr9ZR6JQltAt2buldy1oOXVCxAX9fFcfogXd3apYm/fIPufpk8wGUybtavY4mxoGm hwcyOi1N8oLpGx0XcO8KKCe7P2yYJhPxplcavGXs/u2JWXubDtBJ3tymMkUHwkZp3gcY nHoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=TQtpJOnZ; 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=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm5si12984891ejb.229.2020.11.17.09.24.39; Tue, 17 Nov 2020 09:25:06 -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=@oracle.com header.s=corp-2020-01-29 header.b=TQtpJOnZ; 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=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727552AbgKQRX3 (ORCPT + 99 others); Tue, 17 Nov 2020 12:23:29 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:46676 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbgKQRX2 (ORCPT ); Tue, 17 Nov 2020 12:23:28 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AHHJeh4023927; Tue, 17 Nov 2020 17:23:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=lCI0j81S3i0woS5Vx28EWN/Xr3iRPfZ2DQ1EVZE5Cgs=; b=TQtpJOnZ048mOORXEp80yzCfzAhgyaSQ254isK3CPo681k6c4mTVs3Eu5Q5Nt/CqLKBn 0m8xjVNxqgQtuGDmGCP50G4ciqsK/k+HEsAkHQubbX6i6Msma/zD+9XHmV00r+97YSRW mQco7AJenksEjDQuToVpSpu/drlfqQtBi4b+8VOHwl1KQwxHys1ZCf53qZYZw9BKVnNS g77NlDdwuPIKLaSl+tX3R5AmyAseaz4DQ7hT+J/0PFQQhlTvwfb1SBIZavOzDTBj39mb AIcwTU61AYY3FD9KelpEu5VIA3YQV4ysq8TLhF/Nk/Q9pfTPAmG2i0vlvFp4691H0dZD 4A== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2120.oracle.com with ESMTP id 34t7vn3rpc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Nov 2020 17:23:01 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AHHJTfO091668; Tue, 17 Nov 2020 17:21:01 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 34ts0r6huu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Nov 2020 17:21:01 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AHHKxmJ011967; Tue, 17 Nov 2020 17:20:59 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 17 Nov 2020 09:20:58 -0800 Date: Tue, 17 Nov 2020 09:20:56 -0800 From: "Darrick J. Wong" To: "Theodore Y. Ts'o" Cc: Satya Tangirala , Jaegeuk Kim , Eric Biggers , Chao Yu , Jens Axboe , 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: <20201117172056.GW9695@magnolia> References: <20201117140708.1068688-1-satyat@google.com> <20201117171526.GD445084@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201117171526.GD445084@mit.edu> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9808 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 adultscore=0 bulkscore=0 suspectscore=1 spamscore=0 malwarescore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011170125 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9808 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=1 malwarescore=0 bulkscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 phishscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011170125 Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Nov 17, 2020 at 12:15:26PM -0500, Theodore Y. Ts'o wrote: > 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. In Ye Olde days there was XFS_IOC_DIOINFO to communicate all that (xfs hardcodes 512b file offset alignment), but in this modern era perhaps it's time to shovel that into statx... --D > > - Ted