From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13B5BC5519F for ; Tue, 17 Nov 2020 17:23:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A8F2A246A6 for ; Tue, 17 Nov 2020 17:23:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="TQtpJOnZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727706AbgKQRX3 (ORCPT ); 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