From patchwork Thu Jun 25 23:28:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allison Henderson X-Patchwork-Id: 11626211 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 499A714B7 for ; Thu, 25 Jun 2020 23:29:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ED5B20768 for ; Thu, 25 Jun 2020 23:29:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="NErVuM4p" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732076AbgFYX3Q (ORCPT ); Thu, 25 Jun 2020 19:29:16 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:51174 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731517AbgFYX3M (ORCPT ); Thu, 25 Jun 2020 19:29:12 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05PNSUJo012423 for ; Thu, 25 Jun 2020 23:29:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=i3BGPdhNjPnIo8qd/+b85HFd/Ida22VjTcgVmCagA+w=; b=NErVuM4pLL0nIDR2e4A9MKw533Mqh8S8TKokuO8jmfUL7kgAfQHSRBWhMcYvfC1Vlnk7 R8v21bvzK0f3HPE7K7QGN/e4e7x0ZiE31Gw8OtgOn02XFWerYjYBxQbwvWBYwLcNx1GA +ArM8M9KCo92qd1lJVlZxqnh5TiYOW4f5m2VgfhTO1T8HDaIuhUne2U9Wt9EiTGQ7+jC xAPbKzfzRAx0In/fjkeuur7JWFdJQbiScpByoBljWjhfDkc3iy2mM1bZ3WM3sF7lOjAr ViNppDpMTPwlEItW4uvI5AYLigjUVqtUGyqsCEdbi9m32K7vQ6weEFV6ERHBY4p9Y2fp /g== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 31uustu95s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 25 Jun 2020 23:28:59 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 05PNS3sl141207 for ; Thu, 25 Jun 2020 23:28:59 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3030.oracle.com with ESMTP id 31uur1watp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 25 Jun 2020 23:28:59 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 05PNSwfn016764 for ; Thu, 25 Jun 2020 23:28:58 GMT Received: from localhost.localdomain (/67.1.142.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 25 Jun 2020 23:28:57 +0000 From: Allison Collins To: linux-xfs@vger.kernel.org Subject: [PATCH v10 01/26] xfsprogs: random buffer write failure errortag Date: Thu, 25 Jun 2020 16:28:23 -0700 Message-Id: <20200625232848.14465-2-allison.henderson@oracle.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200625232848.14465-1-allison.henderson@oracle.com> References: <20200625232848.14465-1-allison.henderson@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9663 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250136 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9663 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 cotscore=-2147483648 adultscore=0 bulkscore=0 spamscore=0 phishscore=0 suspectscore=1 priorityscore=1501 lowpriorityscore=0 clxscore=1015 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006250136 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Brian Foster Source kernel commit: 7376d74547344598008d00419eae0caa5f50f4f0 Introduce an error tag to randomly fail async buffer writes. This is primarily to facilitate testing of the XFS error configuration mechanism. Signed-off-by: Brian Foster Reviewed-by: Allison Collins Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Signed-off-by: Allison Collins --- io/inject.c | 1 + libxfs/xfs_errortag.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/io/inject.c b/io/inject.c index 4191c84..352d27c 100644 --- a/io/inject.c +++ b/io/inject.c @@ -54,6 +54,7 @@ error_tag(char *name) { XFS_ERRTAG_FORCE_SCRUB_REPAIR, "force_repair" }, { XFS_ERRTAG_FORCE_SUMMARY_RECALC, "bad_summary" }, { XFS_ERRTAG_IUNLINK_FALLBACK, "iunlink_fallback" }, + { XFS_ERRTAG_BUF_IOERROR, "buf_ioerror" }, { XFS_ERRTAG_MAX, NULL } }; int count; diff --git a/libxfs/xfs_errortag.h b/libxfs/xfs_errortag.h index 79e6c4f..2486dab 100644 --- a/libxfs/xfs_errortag.h +++ b/libxfs/xfs_errortag.h @@ -55,7 +55,8 @@ #define XFS_ERRTAG_FORCE_SCRUB_REPAIR 32 #define XFS_ERRTAG_FORCE_SUMMARY_RECALC 33 #define XFS_ERRTAG_IUNLINK_FALLBACK 34 -#define XFS_ERRTAG_MAX 35 +#define XFS_ERRTAG_BUF_IOERROR 35 +#define XFS_ERRTAG_MAX 36 /* * Random factors for above tags, 1 means always, 2 means 1/2 time, etc. @@ -95,5 +96,6 @@ #define XFS_RANDOM_FORCE_SCRUB_REPAIR 1 #define XFS_RANDOM_FORCE_SUMMARY_RECALC 1 #define XFS_RANDOM_IUNLINK_FALLBACK (XFS_RANDOM_DEFAULT/10) +#define XFS_RANDOM_BUF_IOERROR XFS_RANDOM_DEFAULT #endif /* __XFS_ERRORTAG_H_ */