From patchwork Wed Sep 25 21:34:48 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: 11161451 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 287EF17D4 for ; Wed, 25 Sep 2019 21:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06BDE21D81 for ; Wed, 25 Sep 2019 21:34:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="XCwthDcZ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727655AbfIYVey (ORCPT ); Wed, 25 Sep 2019 17:34:54 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:37710 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727537AbfIYVey (ORCPT ); Wed, 25 Sep 2019 17:34:54 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8PLYTVg057987; Wed, 25 Sep 2019 21:34:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=DwKfP2NPXWz0TRYb+ZLV4zBBOsPZKHQXhRf2foCp9Gg=; b=XCwthDcZNuot+XP1bBMESypmIk+3KfXotz6DiZ4f4m8V2mxwekIrHcw57nQJPmcqyPdY fBluXonTtDeS19mthjcmuWWvr0IhQRk/lM90WV8yGWIv6W1zqFMJsnw1lSrl6wdp5Zbf +RSkIk/MoAZ01hxqhRzBkB9g+r+fl4eXuEQ7APAMZoyKjNVhOfVEhIwBeAWgwTlWnWRs tCtJ2LwJmeE1Ws3BSyK5NKYlJ9FegEh8ECPbayzRYgmGo43QkblP3fO8CSWs74aCcDxj M+gDHxkkAt9+J0sZ/kowtXHR0QCH3eNwMirN9ykNVVjtxL9SN2nCfGjjTJVYi+0e0Qp0 LA== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 2v5b9tyh29-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 21:34:52 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x8PLYSlP078770; Wed, 25 Sep 2019 21:34:51 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2v82tkrfmn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Sep 2019 21:34:51 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x8PLYoqH015327; Wed, 25 Sep 2019 21:34:50 GMT Received: from localhost (/10.145.178.55) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Sep 2019 14:34:50 -0700 Subject: [PATCH 00/11] xfs_scrub: fix IO error detection during media verify From: "Darrick J. Wong" To: sandeen@sandeen.net, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Wed, 25 Sep 2019 14:34:48 -0700 Message-ID: <156944728875.298887.8311229116097714980.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=999 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 Hi all, The existing scrub media scan code (phase 6) has a lot of problems dealing with errors. It treats runtime errors (e.g. ENOMEM) as disk errors, it fails to handle short reads properly, it reports entire extents as failed when the read returns EIO instead of single-stepping filesystem blocks to find the bad ones, and there's no good way to test that it works. This series fixes each of those problems and adds a couple of debugging knobs so that we can simulate disk errors and short reads to make sure that the media scan code actually detects media errors correctly. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=scrub-media-error-detection