Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp729146ybp; Wed, 9 Oct 2019 03:20:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw74GWVa07sCiM4w9VRAbKZ//yu+QruxvuVPwL+RQ4RLfLa7u9a9wu+QqbDf3+vBpuZfPHT X-Received: by 2002:a05:6402:150f:: with SMTP id f15mr2260640edw.240.1570616455296; Wed, 09 Oct 2019 03:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570616455; cv=none; d=google.com; s=arc-20160816; b=Cg/NaXdP9EnHusPDKn9OIZmPAQJoUeWVc6GguO5oFLsWBuBH5nwCmmKZAPdNlmwRvz Cq+ZBQROS+KSEiBEqGdhvFv8AkTr68Ot32ZgKJxMopUMAQDd22humYpaXwKRz5Smjb94 CvDWhaZygEBeShjXPJW47kxP5ycGl6O+VUm1jeu6qpAFcAhiwGsycDw2IcPnOCAAyW+Q UOBJWS9zPe0r8HziHYJCaFExayTNbQCPoVMTrc/ObFVOXXUWLO0RjmLqX1RN2pdSPSRi KHWs5G69qOs+fYhF1S07ZA5Zza+pR1/VXmzJ2FjxiQ9xTevW1lS0ljNgIjxv95WimlO0 PiSg== 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:dkim-signature; bh=0DrBaQnbYtrjFhbkpiALdni53TRw3sfJ8jYLri+SqV4=; b=adUltWJ8rmXif9j5xashCGabi4aSOqnRBLrPKkV1rpai/xzP5h0XM3Kv4LM46B6GI+ //55aDPO2ZuoF2oqPiePdBY+qRmAe6bS9dWca7HvLtRkI3rkOdREs/EQXby65dICvDyo +ppa9aY+O3GZDvndMWpRvOA1lUP5nTQsQJS/r3e3rkq+X63gAgvsx+O8+TmvkjP9Nibe 7XFl9V4OO74QSuSyWCOLSKPypzg3W+pcsAsBJ1QOj6R2+fpIq0jjtZkrFrnUuUZX7CAC D0+9ormg+2wKW53rBYPTGnChsv2qFOZ4eKMo6iWHzFj4l5jHTvfhY0UEHLFZMD05A17l k26g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b="ouZ6pOO/"; 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 z19si861115ejr.244.2019.10.09.03.20.25; Wed, 09 Oct 2019 03:20:55 -0700 (PDT) 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; dkim=pass header.i=@mbobrowski-org.20150623.gappssmtp.com header.s=20150623 header.b="ouZ6pOO/"; 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 S1730811AbfJIKUU (ORCPT + 99 others); Wed, 9 Oct 2019 06:20:20 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42813 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbfJIKUU (ORCPT ); Wed, 9 Oct 2019 06:20:20 -0400 Received: by mail-pg1-f195.google.com with SMTP id z12so1109169pgp.9 for ; Wed, 09 Oct 2019 03:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mbobrowski-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0DrBaQnbYtrjFhbkpiALdni53TRw3sfJ8jYLri+SqV4=; b=ouZ6pOO/agM4GsrLN4pi0tnKoFsu9UjPHH8Vy6ezfb0B6aHXSiQV1PpnCAnHA890xK UeMShA/vOkO07GKl2aqY0wtYOKQNjdPb4jHGxsKxlqqb14FVd+nNhizxidQEOWs6GRhY sd4qEd6rDEz3r7ulIE4HND6FHb5D0FxeOm6ZIrR9nWvvQ5QJaPeLJGoJLfAdXpEdx9je v8se7n/+ZsIFMtexW9GN8V3F9y6+4nfK3yEEYjFEOdS0Hwe8sq9EYyMIZErWjzlI5Og3 0Cu438emMfX/IB4VXBpvnTTWTBP4AWvuZ3jFc9JS/ZLRoIkwvjk61HAeTgbNxYGqTKu/ yjeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0DrBaQnbYtrjFhbkpiALdni53TRw3sfJ8jYLri+SqV4=; b=OrcndwSxMWSKxezDnSSfwDpNPzJjFR7KJ/vTtJWs25nE8/gKMnxmrxDmzUrfMlUtuo bIPRdt8s54FPi4uzoZPmrtZ/AjdE4zjqZbrx4IYeILtu86hxVIVR/ij/kHHiMoUsbsrD kHAceXkUOOjX5Nk0zSMOfcSe1pLDJ9YIw/IXfv5K5XgwqFRC2cLMzoKfPt3Y8xyigsgE av3J4Jk15stYcebL3d87JkJBtbvzna29hfUV3ohzebRchlsHif4/jJawBIKXybleVO33 7pIdgD16W8hBlMN/IjLkNgzVJc16GawNdp3/SiHOMWKaa29LYG4VsWSUBzz2TY2X4ppT Z5pQ== X-Gm-Message-State: APjAAAWO8ZP+Mngnxb6XKDqrECtX3YEKg+2l1T5DrPCQgFJeH1jPfpmx eePFEslTVEfvk/u/kjDhoMYz8wJbom1J X-Received: by 2002:a62:2f05:: with SMTP id v5mr2945334pfv.125.1570616419753; Wed, 09 Oct 2019 03:20:19 -0700 (PDT) Received: from poseidon.bobrowski.net ([114.78.226.167]) by smtp.gmail.com with ESMTPSA id v1sm1820585pfg.26.2019.10.09.03.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 03:20:18 -0700 (PDT) Date: Wed, 9 Oct 2019 21:20:12 +1100 From: Matthew Bobrowski To: Ritesh Harjani Cc: tytso@mit.edu, jack@suse.cz, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, david@fromorbit.com, darrick.wong@oracle.com Subject: Re: [PATCH v4 5/8] ext4: move inode extension/truncate code out from ->iomap_end() callback Message-ID: <20191009102010.GA14749@poseidon.bobrowski.net> References: <20191009062705.694BF42049@d06av24.portsmouth.uk.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191009062705.694BF42049@d06av24.portsmouth.uk.ibm.com> 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 Wed, Oct 09, 2019 at 11:57:04AM +0530, Ritesh Harjani wrote: > On 10/3/19 5:04 PM, Matthew Bobrowski wrote: > > In preparation for implementing the iomap direct I/O write path > > modifications, the inode extension/truncate code needs to be moved out > > from ext4_iomap_end(). For direct I/O, if the current code remained > > within ext4_iomap_end() it would behave incorrectly. Updating the > > inode size prior to converting unwritten extents to written extents > > will potentially allow a racing direct I/O read operation to find > > unwritten extents before they've been correctly converted. > > > > The inode extension/truncate code has been moved out into a new helper > > ext4_handle_inode_extension(). This function has been designed so that > > it can be used by both DAX and direct I/O paths. > > > > Signed-off-by: Matthew Bobrowski > > checkpatch shows some whitespaces error in your comments > in this patch. > But apart from that, patch looks good to me. Yeah, I will fix those. > You may add: > > Reviewed-by: Ritesh Harjani Thanks! ----