From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 274A1C43331 for ; Fri, 6 Sep 2019 03:37:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 25F89206B8 for ; Fri, 6 Sep 2019 03:37:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="JxFThZ80" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392142AbfIFDho (ORCPT ); Thu, 5 Sep 2019 23:37:44 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:43546 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732799AbfIFDho (ORCPT ); Thu, 5 Sep 2019 23:37:44 -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 x863XpYa074291; Fri, 6 Sep 2019 03:37:42 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=JxFThZ80FHLZOfElp9T67CbDKtoOSIe1X7N575Utu47HH8IL4PotiMj6Kk3B3Ao6xYlQ 02lBBQzhW6VyOGWoxy049kL8tKAZhDft/Oay5iemvEBHS6cYtBpQw3jufuHD57veSd6e XnNdV+wZzoI9fZcFCdXB/dFKhEjL9IjYZvG8cmxUKAMQimoHKQCePWeeKfx93txTOZ// j8HhD4d3EBtywRzDmI+hEUKoUWYHMKX80JF3usooAg7iAp5435mNPoxtLLFan7Z7RtSj RKeQ0bwmWYg6dPxtAPdOJ05WHdBzEOpE5Aix0c7Mo2Wqxg7Q0kO1Dx1OFjrf1BmbL1AX CQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2uuf51g38p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Sep 2019 03:37:42 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x863XbcG069151; Fri, 6 Sep 2019 03:37:42 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2utvr4jx3e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Sep 2019 03:37:41 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x863bfmO015687; Fri, 6 Sep 2019 03:37:41 GMT Received: from localhost (/10.159.148.70) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Sep 2019 20:37:41 -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: Thu, 05 Sep 2019 20:37:40 -0700 Message-ID: <156774106064.2645135.2756383874064764589.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9371 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-1906280000 definitions=main-1909060039 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9371 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-1906280000 definitions=main-1909060039 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