Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6254470ybl; Wed, 15 Jan 2020 01:19:53 -0800 (PST) X-Google-Smtp-Source: APXvYqxgqZbjlKHcd/NMyGXu6f4DoaQZJhWFW87vKfCViLxfg401lxmR4wO7fEFM3VTp8VIA1CT/ X-Received: by 2002:a05:6830:2057:: with SMTP id f23mr2128986otp.110.1579079993315; Wed, 15 Jan 2020 01:19:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579079993; cv=none; d=google.com; s=arc-20160816; b=Y+GJM7HL6pa+8WZxPRUo+NyQWhIm5mUyNv+gj96WVq+hueK0cnYn0QMt4DgRnXqmZF b+TV9Mx3jPcchXD/j6ZCOiZknJnRbElk07aGfpqC5TjhmK/LY7cM6FRgClhgorECTATh orcYJAem8TsENeTUdM/yBVZud96YOn7D5/Cb6dYxh4RafpjiLHMpzZpor1E8i3nhEXPX j8Xl6NaziccI/coyYM8ezsrHT5x+ej5ABNhFaGeoB3nNLV+j3P4C2KsjIgR/FxCnp8Rv UTEEPEtsmh+U3vu/eVO7XDPC6e6ls2jazAWEY6L21+CskfNhAeICgw6bRdmWQ/ccuMlY 2Bhw== 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=NtD3k40n36aWTCHTsR+HthGZiD1wPCt26pIkerw0oBo=; b=h4NCHeDj5xrKV40KKoegRSD8FSgM9OFWVTFoOH3wgVYt9btKHWGeK6jbSJ0NimH6BF f2RkunywuLlWBPA7VfPPrR+OJ0Mmxw63KL+BOM0wwUPMoUzHWgcKLkjmmRpPtt5po7yP bbZTs+EBfQCpP8+txL9tDJMTN0/8y0pJtjZoBlT7TWX9Gza1gKm1TCdUKNA0l9HO/zqd Hkboxl5jItBIh/8WA9adWtNR8DSzM61MieDe96cOfDjP2Raor72kbp5q+KDPu+OB/mOw GrZcP9I2dHc0Eee6/gYVUF8EYXwUVaReynmdJGOXu/cqBawugHuFvkaLsS96jtyHkDmd Ov4g== 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 a20si9619425otf.271.2020.01.15.01.19.35; Wed, 15 Jan 2020 01:19:53 -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 S1729277AbgAOJTd (ORCPT + 99 others); Wed, 15 Jan 2020 04:19:33 -0500 Received: from mx2.suse.de ([195.135.220.15]:42446 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729270AbgAOJTd (ORCPT ); Wed, 15 Jan 2020 04:19:33 -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 5EE8FAEFF; Wed, 15 Jan 2020 09:19:31 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id EA9E31E0CBC; Wed, 15 Jan 2020 10:19:25 +0100 (CET) Date: Wed, 15 Jan 2020 10:19:25 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , "Darrick J. Wong" , Ritesh Harjani , linux-ext4@vger.kernel.org, tytso@mit.edu Subject: Re: [RFC 1/2] iomap: direct-io: Move inode_dio_begin before filemap_write_and_wait_range Message-ID: <20200115091925.GC31450@quack2.suse.cz> References: <27607a16327fe9664f32d09abe565af0d1ae56c9.1578907891.git.riteshh@linux.ibm.com> <20200113215159.GA8235@magnolia> <20200114090507.GA6466@quack2.suse.cz> <20200114163818.GB7127@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200114163818.GB7127@infradead.org> 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 Tue 14-01-20 08:38:18, Christoph Hellwig wrote: > On Tue, Jan 14, 2020 at 10:05:07AM +0100, Jan Kara wrote: > > > > 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. > > Currently XFS never uses unwritten extents when converting delalloc > extents. I see, it is a long time since I last looked at that part of XFS code. So then I think XFS might be prone to the same kind of race and data exposure as I outlined in [1]... Honza [1] https://lore.kernel.org/linux-ext4/20200114094741.GC6466@quack2.suse.cz -- Jan Kara SUSE Labs, CR