From patchwork Wed Sep 25 21:36:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11161505 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C22C376 for ; Wed, 25 Sep 2019 21:36:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0C4721D80 for ; Wed, 25 Sep 2019 21:36:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="iUhhDBsQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727859AbfIYVgn (ORCPT ); Wed, 25 Sep 2019 17:36:43 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:45278 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbfIYVgn (ORCPT ); Wed, 25 Sep 2019 17:36:43 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8PLYTjS010165; Wed, 25 Sep 2019 21:36:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=VxaygWhDkwmV3aBCJxtuaz+/G5I2VIoghhYEwIuEhqA=; b=iUhhDBsQphPyKPqi2ACbRFbWoJKn+mix0QlClxKXDIrZmF+eXlH0al+dmcB6DN305O4b CKjJ0DB7y9BfJRAsKAt93+BBdCoJObX3Pvhcm9vA6Vx6EVOV4koBWr0mqglw6TRrwIh2 6Jiudez454JnftrDAfAhS5Y4FaH1yfe48FYtNgMCgs/Eq554n9AMBqZ+u+32zfjy2C4q My1RGvKunzeOA7S2AOzvE8h4pyOFCq2junebvo+/2rUZcDoxAfVcF9XN1KfWFREVa/Vn UE3XTdazT9b7aYTftgJzJ0ffbnPRUi7+StcvxiAm9S3HRy0E+cjAqdpXIAO7jiOxsN+b eQ== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 2v5btq7hwb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 21:36:41 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8PLYScH011446; Wed, 25 Sep 2019 21:36:40 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 2v829w525q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 21:36:40 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x8PLad9t016087; Wed, 25 Sep 2019 21:36:39 GMT Received: from localhost (/10.145.178.55) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Sep 2019 14:36:39 -0700 Subject: [PATCH 05/11] xfs_scrub: don't report media errors on unwritten extents From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Wed, 25 Sep 2019 14:36:38 -0700 Message-ID: <156944739811.300131.17079426522479861861.stgit@magnolia> In-Reply-To: <156944736739.300131.5717633994765951730.stgit@magnolia> References: <156944736739.300131.5717633994765951730.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9391 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=978 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909250174 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9391 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909250174 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Don't report media errors for unwritten extents since no data has been lost. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen --- scrub/phase6.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scrub/phase6.c b/scrub/phase6.c index 1013ba6d..ec821373 100644 --- a/scrub/phase6.c +++ b/scrub/phase6.c @@ -372,6 +372,10 @@ xfs_check_rmap_error_report( uint64_t err_physical = *(uint64_t *)arg; uint64_t err_off; + /* Don't care about unwritten extents. */ + if (map->fmr_flags & FMR_OF_PREALLOC) + return true; + if (err_physical > map->fmr_physical) err_off = err_physical - map->fmr_physical; else