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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 1874EC33CB1 for ; Wed, 15 Jan 2020 06:48:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DE8882467A for ; Wed, 15 Jan 2020 06:48:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DE8882467A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7ADAC8E0005; Wed, 15 Jan 2020 01:48:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 75E098E0003; Wed, 15 Jan 2020 01:48:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 673C18E0005; Wed, 15 Jan 2020 01:48:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0235.hostedemail.com [216.40.44.235]) by kanga.kvack.org (Postfix) with ESMTP id 518288E0003 for ; Wed, 15 Jan 2020 01:48:31 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id F1E98181AEF07 for ; Wed, 15 Jan 2020 06:48:30 +0000 (UTC) X-FDA: 76378939980.06.plant51_847e9d43e4d10 X-HE-Tag: plant51_847e9d43e4d10 X-Filterd-Recvd-Size: 1854 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf44.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 06:48:30 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 7952D68AFE; Wed, 15 Jan 2020 07:48:27 +0100 (CET) Date: Wed, 15 Jan 2020 07:48:27 +0100 From: Christoph Hellwig To: "Theodore Y. Ts'o" Cc: Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Waiman Long , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Will Deacon , Andrew Morton , linux-ext4@vger.kernel.org, cluster-devel@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 08/12] ext4: hold i_rwsem until AIO completes Message-ID: <20200115064827.GA21176@lst.de> References: <20200114161225.309792-1-hch@lst.de> <20200114161225.309792-9-hch@lst.de> <20200114215023.GH140865@mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200114215023.GH140865@mit.edu> User-Agent: Mutt/1.5.17 (2007-11-01) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 14, 2020 at 04:50:23PM -0500, Theodore Y. Ts'o wrote: > I note that you've dropped the inode_dio_wait() in ext4's ZERO_RANGE, > COLLAPSE_RANGE, INSERT_RANGE, etc. We had added these to avoid > problems when various fallocate operations which modify the inode's > logical->physical block mapping racing with direct I/O (both reads or > writes). > > I don't see a replacement protection in this patch series. How does > are file systems supported to protect against such races? By holding i_rwsem until the direct I/O operations are finished, and not just until they are sumbitted.