Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp599974ybl; Thu, 12 Dec 2019 01:39:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwAj5k9lT1NAUfButiSpcu8+WvjmEhiVBWrYdnwvTFLdY8Os3eKUaj/cyks9B8ScTEJdAuO X-Received: by 2002:a9d:4f0f:: with SMTP id d15mr7336106otl.179.1576143579292; Thu, 12 Dec 2019 01:39:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576143579; cv=none; d=google.com; s=arc-20160816; b=az9616m3IVpydL5QYIdl0FFo4JsxZLDembtOXv3GdaOzu8Atis1psrGN1zKWIRasCy rNoP0kDmxDZU1LW6i8RTkSVZuIwqYLlyrVyDPU3HCfSxGNdVSsCjQ7O8V1Mw+lxMcmxP sG3mROXEY3dUjDjrL2XGBnGWMns2vOSFZZmsby+Op/DucodY2D3tjh/fd/ZO+dVcUKBY 7jXRg6Ne4gQ7j6uqMESCOgA3g1jfCCuv5cAngV6ybo8+cdgZ1g174AXt9amuvss/JXcH ThpI67xKNbvTcgkrHZ5DMS1wbV+l/hKYrLeRtQgsULgXKiW+WoXCYS6s846WYku9TZ/R GwAg== 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=XPavj7Mka33LZiN2YRxIkx2tyFrP8lDTqURGz7uz7B0=; b=ydrSiVbkpHef34bfAId/iaLNiJAg64PRQIwAP1sJ1HdtoZc87Goyg9Lm0CSEZTLi9l S5TrRP/VQJq5SXijA1C4wQLtDUGm9f2pwGTmJLlxbfHxKhQhlJA/L0lLim6FxkqmhkZl eUdxZIsx7f9S7uEnoLnR7lUpLEFMbm99s+iI0fY8iYLeZ4b6W/vpu60RX3DRvoCi6TLn bTsmINmnbQRimFImba4Q4MhTnJq/E/wd67mQjDGv9Q0ba4PpdS2vno9YxwfRNl7Jtnyp myPsTlPUqi40Y6lrJLEXIZ+mGQeh7TntCtOVqrIhDSjwp2PbNApyC/XIm27ox/TtlQPd iQow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MzLG+BPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j71si2722429oib.213.2019.12.12.01.39.27; Thu, 12 Dec 2019 01:39:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=MzLG+BPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728429AbfLLJhg (ORCPT + 99 others); Thu, 12 Dec 2019 04:37:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:37122 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728230AbfLLJhg (ORCPT ); Thu, 12 Dec 2019 04:37:36 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 149F622527; Thu, 12 Dec 2019 09:37:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576143455; bh=oJ1Wi824XDxsCOW+eDltih+dYyGc1ssB6AgkDwln7/A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MzLG+BPoGDbAsQQFGz0+FxhYifZncRdJEGAYJZ/krqgFV9t9uHmvHD8YxubcBXuyP bbcnMooMOpzLc17uSgFjPKliegutg7nRg/Q5qXs0T3zgB6UB/LcE8sk6tf+pokrpbo ttxd1aIRQRfN3X92pYGs2z+l/gw/SSQBzzbvcp5M= Date: Thu, 12 Dec 2019 10:33:04 +0100 From: Greg Kroah-Hartman To: Nobuhiro Iwamatsu Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Dave Chinner , Christoph Hellwig , "Darrick J. Wong" , Sasha Levin Subject: Re: [PATCH 4.19 070/243] xfs: extent shifting doesnt fully invalidate page cache Message-ID: <20191212093304.GC1378792@kroah.com> References: <20191211150339.185439726@linuxfoundation.org> <20191211150343.827226097@linuxfoundation.org> <20191211232613.pxegji52vf4gd3eh@toshiba.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211232613.pxegji52vf4gd3eh@toshiba.co.jp> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 12, 2019 at 08:26:13AM +0900, Nobuhiro Iwamatsu wrote: > On Wed, Dec 11, 2019 at 04:03:52PM +0100, Greg Kroah-Hartman wrote: > > From: Dave Chinner > > > > [ Upstream commit 7f9f71be84bcab368e58020a42f6d0dd97adf0ce ] > > > > The extent shifting code uses a flush and invalidate mechainsm prior > > to shifting extents around. This is similar to what > > xfs_free_file_space() does, but it doesn't take into account things > > like page cache vs block size differences, and it will fail if there > > is a page that it currently busy. > > > > xfs_flush_unmap_range() handles all of these cases, so just convert > > xfs_prepare_shift() to us that mechanism rather than having it's own > > special sauce. > > > > Signed-off-by: Dave Chinner > > Reviewed-by: Christoph Hellwig > > Reviewed-by: Darrick J. Wong > > Signed-off-by: Darrick J. Wong > > Signed-off-by: Sasha Levin > > > This commit also required following commit: > > commit 1749d1ea89bdf3181328b7d846e609d5a0e53e50 > Author: Brian Foster > Date: Fri Apr 26 07:30:24 2019 -0700 > > xfs: add missing error check in xfs_prepare_shift() > > xfs_prepare_shift() fails to check the error return from > xfs_flush_unmap_range(). If the latter fails, that could lead to an > insert/collapse range operation over a delalloc range, which is not > supported. > > Add an error check and return appropriately. This is reproduced > rarely by generic/475. > > Fixes: 7f9f71be84bc ("xfs: extent shifting doesn't fully invalidate page cache") > Signed-off-by: Brian Foster > Reviewed-by: Darrick J. Wong > Signed-off-by: Darrick J. Wong > Reviewed-by: Allison Collins > Reviewed-by: Dave Chinner Now added, thanks! greg k-h