Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4969976ybl; Tue, 14 Jan 2020 01:05:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx9Ylx8syAXEVUouaEmHYfH7VWiCwp1QPNhbPdUkI588Su2Ix5ZHRmebUTA6mARtPuNepGI X-Received: by 2002:aca:3141:: with SMTP id x62mr15244925oix.108.1578992739383; Tue, 14 Jan 2020 01:05:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578992739; cv=none; d=google.com; s=arc-20160816; b=GfT5O+3CYulUawD6lToMQMFuwwaTNBMj+PFO0KESvo7PZcgb0IMvYDQvh0DRWIB/rx Rj8j6f8R1rBTEPTec8r6OD38Fs1ahpvmV06iYIkI9yHDBbEGODKCFWI9jeib+RPgyN+/ mUW9+ylghO0PMaXHXlHg+cvjodk2EA/hk49jA8Lbkl0eQLDsUwwH7D9iCwt3QkgK/Dr3 cEqI6VOIhx8icTZXS8Gt45ikigAHu2fisTzSdcTW3U0HZtawxVMOxNQRMM/VW96NVKPf G/Bt2FEB8xTBziW9jyXGLHzaJP1eyMNGumBVc1XaQx8qrSfUxb6hJVte3UGtmPejxYV/ nI+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=p4gkebPFbGPWp3FHVUqj9jIO2PKncE3xjbQNcWxSnp0=; b=RL4jKawYlhyV5nW4Ac/QniW9oQrkKaJhtYRpxXBg1bftwRIUSHBt5aETBfDV99ay+H IAo8Fve4xXrAYLvM1nN8aD+A0i+ddWO0fjiZqv+JjgpyawlfxnPUwhRRE+E/AMoW2A10 Q1Lrb1f0HNNqO5OklfQbuChv43aF5R2olsBQQaIDbkkSCXnqJytEMsqXqo6/FWhVNQR1 7MU/hc/T+D4UEoiQYGQjwuEuB/e+hrTqy1WL3eFLnTMIMAbZFPVfswmrVG+W4kAEdhga 16znpa1WQMkCXrkJmz2YJAxhIBXkYiwU4wvNPNY3DZG6OsXIKBWyCgCfQDD8efKIEX/p Ybkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5si7399368oif.211.2020.01.14.01.05.19; Tue, 14 Jan 2020 01:05:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728746AbgANJFJ (ORCPT + 99 others); Tue, 14 Jan 2020 04:05:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:45004 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725820AbgANJFJ (ORCPT ); Tue, 14 Jan 2020 04:05:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id EA9FBAC54; Tue, 14 Jan 2020 09:05:07 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 8589F1E0D0E; Tue, 14 Jan 2020 10:05:07 +0100 (CET) Date: Tue, 14 Jan 2020 10:05:07 +0100 From: Jan Kara To: "Darrick J. Wong" Cc: Ritesh Harjani , linux-ext4@vger.kernel.org, tytso@mit.edu, jack@suse.cz Subject: Re: [RFC 1/2] iomap: direct-io: Move inode_dio_begin before filemap_write_and_wait_range Message-ID: <20200114090507.GA6466@quack2.suse.cz> References: <27607a16327fe9664f32d09abe565af0d1ae56c9.1578907891.git.riteshh@linux.ibm.com> <20200113215159.GA8235@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200113215159.GA8235@magnolia> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon 13-01-20 13:51:59, Darrick J. Wong wrote: > On Mon, Jan 13, 2020 at 04:34:21PM +0530, Ritesh Harjani wrote: > > Some filesystems (e.g. ext4) need to know in it's writeback path, that > > whether DIO is in progress or not. This info may be needed to avoid the > > stale data exposure race with DIO reads. > > Does XFS have this problem too? > > Admittedly dio read during mmap write is probably not well supported. ;) Well, XFS always performs buffered writeback using unwritten extents so at least the immediate problem of stale data exposure ext4 has does not happen there AFAICT. Honza -- Jan Kara SUSE Labs, CR