From patchwork Sat Apr 6 10:37:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 10888123 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDA2418E8 for ; Sat, 6 Apr 2019 10:38:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3B0F2880A for ; Sat, 6 Apr 2019 10:38:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A753E28AFF; Sat, 6 Apr 2019 10:38:12 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 691AC28B2D for ; Sat, 6 Apr 2019 10:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726539AbfDFKiK (ORCPT ); Sat, 6 Apr 2019 06:38:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:49760 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726036AbfDFKiK (ORCPT ); Sat, 6 Apr 2019 06:38:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 33632AC1B; Sat, 6 Apr 2019 10:38:09 +0000 (UTC) From: Qu Wenruo To: linux-btrfs@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v2 2/2] btrfs: Add error string for EUCLEAN Date: Sat, 6 Apr 2019 18:37:59 +0800 Message-Id: <20190406103759.6330-2-wqu@suse.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190406103759.6330-1-wqu@suse.com> References: <20190406103759.6330-1-wqu@suse.com> MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since we're going to support write time tree checker, it's possible that transaction get aborted due to tree-checker, also due to new BLK_STS_UCLEAN bit, we can distinguish real EIO error and EUCLEAN error. So adding new string for EUCLEAN to make the "unknown" reason to an easy to read one. Signed-off-by: Qu Wenruo --- changelog: v2: - Use the original error message from EUCLEAN. --- fs/btrfs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 120e4340792a..f69a6696f59d 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -86,6 +86,9 @@ const char *btrfs_decode_error(int errno) case -ENOENT: errstr = "No such entry"; break; + case -EUCLEAN: + errstr = "Structure needs cleaning"; + break; } return errstr;