Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp142400ybl; Wed, 11 Dec 2019 15:27:31 -0800 (PST) X-Google-Smtp-Source: APXvYqz9qkdCXVtDG+tKNXFy2mobuq0DySvS6qOMqL0OPo040Im0oMlMjCFyT08zUdiiDrEO4dGT X-Received: by 2002:aca:3b45:: with SMTP id i66mr4115183oia.5.1576106851048; Wed, 11 Dec 2019 15:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576106851; cv=none; d=google.com; s=arc-20160816; b=AuOqRSJEeF6yLLqRWhIDJtZBEWeX9/WrHL+R1tYOb/Zsm6LFmD7ed5zXIIWQx8y/7C 2K4kKDcZho/vqHXglhGPE5U/QUaSgBFtgTRro2ipFNY4x1yvimNhJsq/I3nmhyCOHw1N kHSKKaJx3VmwkCKAJC3ejuOid3uRnYgEZXwg+luH/+p+xsOvxw9YDnCi+w8L2xVP8c6M bnsq3mJwcNssVT3ilb0fEygFGQQ4zC3KEJIjUJ3SyyybJfqBqHwIAzcxjGDpP2zX0ic3 zI40DreINQiNWZWUryygbFkbqaYADsfVsP8FoHrvbsjKKssoqszl0FRvMuN2wstGZ8pt EeZw== 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; bh=bdC6RloAVYCuGReVBGu1YTePO2NUXhD7CnmOTRG/tCU=; b=qdUHbxsPU6kMvLdv8+K3tIk1MtRRXTR27R2IFeeuaC/fg80balQnYOSsQapW9OuQ4B Q0PP/JN3L0uAHLrIz8l7/Yc7b3iCmYm/Fuz5IIkQFxGWQEefkMhmBZ9o6N9vzohwFQNS ubnu9o81dJZgpV+sz23pwiVmSsIG130QunPaO7mQ3fTjbZs6lzMal8/5p3RvybDh6kbe zxPelrC3NWRwjqEYwcfyEHZCqyN/Q6+i9wN2z8N8i1CsFDaVcvtb/CmfhTeSzUKjRKZ+ 8SxQd2IBOnYpbCaaWFPKkEWge8Cjibtabw+DklM12YGUGAEuJIh9QHtIWF8yckmkl8gl fPTg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l67si2164691oib.151.2019.12.11.15.27.18; Wed, 11 Dec 2019 15:27:31 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=toshiba.co.jp Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbfLKX0h (ORCPT + 99 others); Wed, 11 Dec 2019 18:26:37 -0500 Received: from mo-csw1514.securemx.jp ([210.130.202.153]:42314 "EHLO mo-csw.securemx.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726589AbfLKX0h (ORCPT ); Wed, 11 Dec 2019 18:26:37 -0500 Received: by mo-csw.securemx.jp (mx-mo-csw1514) id xBBNQGx9023348; Thu, 12 Dec 2019 08:26:16 +0900 X-Iguazu-Qid: 34tMdwKSzMOQZNctuq X-Iguazu-QSIG: v=2; s=0; t=1576106776; q=34tMdwKSzMOQZNctuq; m=kiQa5XRS9qAOPHWASNRbe18DoY7epzfGCCQxMfHhxyc= Received: from imx12.toshiba.co.jp (imx12.toshiba.co.jp [61.202.160.132]) by relay.securemx.jp (mx-mr1510) id xBBNQE0K001920; Thu, 12 Dec 2019 08:26:15 +0900 Received: from enc02.toshiba.co.jp ([61.202.160.51]) by imx12.toshiba.co.jp with ESMTP id xBBNQEC0000183; Thu, 12 Dec 2019 08:26:14 +0900 (JST) Received: from hop101.toshiba.co.jp ([133.199.85.107]) by enc02.toshiba.co.jp with ESMTP id xBBNQEUg014415; Thu, 12 Dec 2019 08:26:14 +0900 Date: Thu, 12 Dec 2019 08:26:13 +0900 From: Nobuhiro Iwamatsu To: Greg Kroah-Hartman 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 X-TSB-HOP: ON Message-ID: <20191211232613.pxegji52vf4gd3eh@toshiba.co.jp> References: <20191211150339.185439726@linuxfoundation.org> <20191211150343.827226097@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191211150343.827226097@linuxfoundation.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Best regards, Nobuhirio