Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp833994ybh; Tue, 21 Jul 2020 09:00:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxmjeZC42m6zRB1HJkri91H+gxr5/kiwmKeiGc/p2P3lVbQSvJqkQNgpZ7eOpmIW4eAHi+ X-Received: by 2002:a17:906:1b45:: with SMTP id p5mr25687044ejg.51.1595347230791; Tue, 21 Jul 2020 09:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595347230; cv=none; d=google.com; s=arc-20160816; b=THV5GUeETW/EKBsY4DanORceIUN9S+CS8bwOxSjxLJeyXDabw/QEYV5b3Y9G+UwZMQ iXyKGaB+2/4DJF2eIlsFIZWTHyZABw0X3cgGqA9wK14gOtZzMavv8Xs5B9HFb82WHqMN eOTZTVQ/SeZll5K4SsYCML/86OSSRMUDomW7PTy9SEmt8UmWbqJEwRMjpbBfUiBk3YW5 tKMwSaq3tKtClGOqQN0ajMfmfeXT0JnPrVA8W8HDbNZ/kv1bsSSEVfY0iXw08h4t8DyF C1l5/+bppO6Mo6B5FqRT/As+FHHa568a1Q1CwKivtR0Kv4ES/jqfCwjXOHg2IuqXEtk7 MXww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=+hJjl03dwyfhyAM7vvxyq6ko6TRAkniUFmQ4++wlE5g=; b=gCzSi6ap0QI/F/ev370Kii802sudNfdvXZutVd/Doxo++I4xMSIQWcumck8bt6TPLa GTVhJq4I+2otPDY1rHg986edyeAeWxCD0722ojjlc73jaZV2QNVB+i+QDH/BrvbbVAac 8OSSawk7tjCc0oI9d0zf4GPuRLXNuSnFWM9CNAil8fUm9VdqM7mb7w14p2/fZmD6PqQm CZV2nhL/JIqVfVv3ZgaKn5vRa2WOLtcKTP/Qprt1ZruC8iwjY5Nuy8MFJXg8I48t4lDo 9QA9tCVaxKmeJlUpisUqD2x0ie58NSxLXRbjEL+znTCskT4APwkeHk7Z2KOAsua7OJ+M yUwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=rpnCULCd; 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 u6si13099582edy.584.2020.07.21.09.00.05; Tue, 21 Jul 2020 09:00:30 -0700 (PDT) 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=rpnCULCd; 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 S1728369AbgGUP7k (ORCPT + 99 others); Tue, 21 Jul 2020 11:59:40 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:37984 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726892AbgGUP7j (ORCPT ); Tue, 21 Jul 2020 11:59:39 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06LFhHgH017335; Tue, 21 Jul 2020 15:59:29 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=+hJjl03dwyfhyAM7vvxyq6ko6TRAkniUFmQ4++wlE5g=; b=rpnCULCd1AkP1B+OA+5pMaIBNWGDaZ8AmkPc6oa4SpjJBKa60h9+UAi/zTLjrSbAqdP9 BSsfsdpupViPWYwVS7bHwuSkNdBYVGYj0AuW3XFKIb6fjBS5LW8C7nKCdkFwCrsCQu2h qPiMQURxcl/pGgbHWwCK4OE2DlqA3AAhg/waOfDNgL6GlBcRSf3BSv0BSdlNLLuqCQ2N IjjQIcpH+cCgpH4dp4gxOns8bAemL+kgLY74aba63+wliHnhh/N5PFV59qw0MmsCt750 teRn96WN48l/Zv8YeyvQmTwZHmbR3anLrc7lYrxxuCIjC9PwxHcuj3IaOG+y1f/let4G 8Q== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 32bs1me47p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 21 Jul 2020 15:59:29 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 06LFi3A7005806; Tue, 21 Jul 2020 15:59:29 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 32e2s92ddt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Jul 2020 15:59:29 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06LFxS58031514; Tue, 21 Jul 2020 15:59:28 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 21 Jul 2020 08:59:27 -0700 Date: Tue, 21 Jul 2020 08:59:25 -0700 From: "Darrick J. Wong" To: Christoph Hellwig Cc: Matthew Wilcox , Goldwyn Rodrigues , Dave Chinner , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, Michael Kerrisk , linux-man@vger.kernel.org Subject: Re: RFC: iomap write invalidation Message-ID: <20200721155925.GB3151642@magnolia> References: <20200713074633.875946-1-hch@lst.de> <20200720215125.bfz7geaftocy4r5l@fiona> <20200721145313.GA9217@lst.de> <20200721150432.GH15516@casper.infradead.org> <20200721150615.GA10330@lst.de> <20200721151437.GI15516@casper.infradead.org> <20200721151616.GA11074@lst.de> <20200721152754.GD7597@magnolia> <20200721154132.GA11652@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200721154132.GA11652@lst.de> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9689 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007210112 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9689 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 bulkscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 clxscore=1015 spamscore=0 mlxscore=0 impostorscore=0 phishscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007210112 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Jul 21, 2020 at 05:41:32PM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 08:27:54AM -0700, Darrick J. Wong wrote: > > On Tue, Jul 21, 2020 at 05:16:16PM +0200, Christoph Hellwig wrote: > > > On Tue, Jul 21, 2020 at 04:14:37PM +0100, Matthew Wilcox wrote: > > > > On Tue, Jul 21, 2020 at 05:06:15PM +0200, Christoph Hellwig wrote: > > > > > On Tue, Jul 21, 2020 at 04:04:32PM +0100, Matthew Wilcox wrote: > > > > > > I thought you were going to respin this with EREMCHG changed to ENOTBLK? > > > > > > > > > > Oh, true. I'll do that ASAP. > > > > > > > > Michael, could we add this to manpages? > > > > > > Umm, no. -ENOTBLK is internal - the file systems will retry using > > > buffered I/O and the error shall never escape to userspace (or even the > > > VFS for that matter). > > > > It's worth dropping a comment somewhere that ENOTBLK is the desired > > "fall back to buffered" errcode, seeing as Dave and I missed that in > > XFS... > > Sounds like a good idea, but what would a good place be? In the comment that precedes iomap_dio_rw() for the iomap version, and... ...ye $deity, the old direct-io.c file is a mess of wrappers. Uh... a new comment preceding __blockdev_direct_IO? Or blockdev_direct_IO? Or both? Or I guess the direct_IO documentation in vfs.rst...? ``direct_IO`` called by the generic read/write routines to perform direct_IO - that is IO requests which bypass the page cache and transfer data directly between the storage and the application's address space. This function can return -ENOTBLK to signal that it is necessary to fallback to buffered IO. Note that blockdev_direct_IO and variants can also return -ENOTBLK. --D