From patchwork Thu Aug 31 14:15:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 9932287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71C9960309 for ; Thu, 31 Aug 2017 14:11:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6456C28514 for ; Thu, 31 Aug 2017 14:11:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5968128696; Thu, 31 Aug 2017 14:11:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A998928514 for ; Thu, 31 Aug 2017 14:11:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751412AbdHaOLP (ORCPT ); Thu, 31 Aug 2017 10:11:15 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:5076 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751205AbdHaOLO (ORCPT ); Thu, 31 Aug 2017 10:11:14 -0400 Received: from 172.30.72.60 (EHLO DGGEMS410-HUB.china.huawei.com) ([172.30.72.60]) by dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DGI68917; Thu, 31 Aug 2017 22:11:07 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.301.0; Thu, 31 Aug 2017 22:11:05 +0800 From: Hou Tao To: CC: , , Subject: [PATCH 7/7] xfs: document the customizable default values of error configuration Date: Thu, 31 Aug 2017 22:15:58 +0800 Message-ID: <1504188958-18374-8-git-send-email-houtao1@huawei.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1504188958-18374-1-git-send-email-houtao1@huawei.com> References: <1504188958-18374-1-git-send-email-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0203.59A818FC.011B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7c855fc4c0503ac9e7a312ed2d52f009 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Mainly the sysfs paths of the default values and the difference between the default errror configuration and the fs-specific one. Signed-off-by: Hou Tao --- Documentation/filesystems/xfs.txt | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 3b9b5c1..0be68fc 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt @@ -397,12 +397,25 @@ Where: The individual error handler configurations. +For the convenience of error configuration, there are also configuration files +used for the default values of error configuration of all mounted filesystem: + + /sys/fs/xfs/default_error/// + +There is only one difference between the error configuration options under +these two sysfs trees: the options under /error/ can have a value of +"default", and the options under default_error/ can not. Each filesystem has "global" error configuration options defined in their top level directory: /sys/fs/xfs//error/ +For the default values of the "global" error configuration options, the +directory is: + + /sys/fs/xfs/default_error/ + fail_at_unmount (Min: 0 Default: 1 Max: 1) Defines the filesystem error behavior at unmount time. @@ -417,6 +430,9 @@ level directory: filesystem from ever unmounting fully in the case of "retry forever" handler configurations. + If set to "default", the behavior will be decided by the value of + /sys/fs/xfs/default_error/fail_at_unmount. + Note: there is no guarantee that fail_at_unmount can be set whilst an unmount is in progress. It is possible that the sysfs entries are removed by the unmounting filesystem before a "retry forever" error @@ -427,12 +443,17 @@ level directory: Each filesystem has specific error class handlers that define the error propagation behaviour for specific errors. There is also a "default" error handler defined, which defines the behaviour for all errors that don't have -specific handlers defined. Where multiple retry constraints are configuredi for +specific handlers defined. Where multiple retry constraints are configured for a single error, the first retry configuration that expires will cause the error to be propagated. The handler configurations are found in the directory: /sys/fs/xfs//error/// +There is also a corresponding directory for the default values of these +handler configuration: + + /sys/fs/xfs/default_error/// + max_retries (Min: -1 Default: Varies Max: INTMAX) Defines the allowed number of retries of a specific error before the filesystem will propagate the error. The retry count for a given @@ -448,6 +469,10 @@ to be propagated. The handler configurations are found in the directory: Setting the value to "N" (where 0 < N < Max) will make XFS retry the operation "N" times before propagating the error. + Setting the value to "default" will let the default value of the handler, + namely the value of default_error///max_retries, + to decide the error propagation behavior. + retry_timeout_seconds (Min: -1 Default: Varies Max: 1 day) Define the amount of time (in seconds) that the filesystem is allowed to retry its operations when the specific error is @@ -462,6 +487,10 @@ to be propagated. The handler configurations are found in the directory: Setting the value to "N" (where 0 < N < Max) will allow XFS to retry the operation for up to "N" seconds before propagating the error. + Setting the value to "default" will let the default value of the handler, + namely the value of default_error///retry_timeout_seconds, + to decide the error propagation behavior. + Note: The default behaviour for a specific error handler is dependent on both the class and error context. For example, the default values for "metadata/ENODEV" are "0" rather than "-1" so that this error handler defaults