From patchwork Wed Mar 7 17:37:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Calleja X-Patchwork-Id: 10264609 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 5F9AF602BD for ; Wed, 7 Mar 2018 17:37:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C45228ADD for ; Wed, 7 Mar 2018 17:37:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4112C28B90; Wed, 7 Mar 2018 17:37:42 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 D1F0B28ADD for ; Wed, 7 Mar 2018 17:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933791AbeCGRhi (ORCPT ); Wed, 7 Mar 2018 12:37:38 -0500 Received: from mail-wr0-f181.google.com ([209.85.128.181]:42105 "EHLO mail-wr0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933698AbeCGRhe (ORCPT ); Wed, 7 Mar 2018 12:37:34 -0500 Received: by mail-wr0-f181.google.com with SMTP id k9so3003100wre.9 for ; Wed, 07 Mar 2018 09:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fDOEfAlowbgYmrVk+fFznnMMqwrwNxjWQAB6uq/7C+Q=; b=NycOf7l+Syupum7wZ0qFvTAWUSzMtTJn7EHmXh2f6BboPA5ULiJ6LqH6frHw0lotHH c1DY+GSkJLDk13RMmGbjriXbhmH7reaB30odLvdY7tpDoLn6Tl9dQ16kyU+Ds4d6Rafv dGIl7xaNFE6+ydJvORFv59idCWFFPYdpNoTtvDhmy0ctLUKdUC9Iz2/1Y5oJzKCY8dEL cfBKu41d2mGA7YFGMWCjbBIktoNaScvaBHC2VKD7hpyzR3k7WVgHS5didDrRD3ojLvrG djXcNnAGxuBuqMNVUQ93kuOd/faVQC40mBm/5GTHD6G5uLcHT0CYtI7vRb5xr2EseyxR rxAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fDOEfAlowbgYmrVk+fFznnMMqwrwNxjWQAB6uq/7C+Q=; b=bUCQFa8uEzFB67IrSmdVIFu1c5LQ03Mx0DA3v2hkbPydurgfCTuYgDoWmkE+75bwzn PXFYeGSYmvzqYuHxziBLPv237M+3Swam7awXytwMF9qddN5W2teCqyeiq10bq4EUgiO8 5teCDt7sPjXFKdaKz8KEnmZxiPQpISfunJo6mwm0T6S0v7/4l2WBmwaPt8UtletBe2JI H4LP7JP0c+bHaqQa4a/u7sJt/hr0ZXQdpVuZ1RzH8jjfi5qp/MkxnavucXPsbQ1EPbEE LY9FF3M8qCQhc9q6B/EgQtlDZ7PHE15UhwxD/xdJSaa9LcVg6Vk1yLIrBhUYBAVnup2r WLVQ== X-Gm-Message-State: APf1xPCQoWnkv9RMcxwdZstINfgCIu8tYUm1fMq70TAxiKnDQ3T6Wgn7 kPyjHWW4upgM5CcY93OyaF5qyQ== X-Google-Smtp-Source: AG47ELuAqKJ8tluSAPRg2PAWMHP+8BNig4+N7isJ5Uyrd7B6iTAnEtx+IkPWkX/GdgHen5jfKqtWaQ== X-Received: by 10.223.136.71 with SMTP id e7mr19345539wre.252.1520444252601; Wed, 07 Mar 2018 09:37:32 -0800 (PST) Received: from archlinux.localnet (229.red-79-150-122.dynamicip.rima-tde.net. [79.150.122.229]) by smtp.gmail.com with ESMTPSA id r6sm19807319wrg.63.2018.03.07.09.37.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Mar 2018 09:37:31 -0800 (PST) From: Diego To: linux-btrfs@vger.kernel.org Subject: [PATCH] Improve error stats message Date: Wed, 07 Mar 2018 18:37:29 +0100 Message-ID: <1588327.cr4xlG2VNd@archlinux> MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A typical notification of filesystem errors looks like this: BTRFS error (device sda2): bdev /dev/sda2 errs: wr 0, rd 1, flush 0, corrupt 0, gen 0 The device name is being printed twice. Also, these abbreviatures feel unnecesary. Make the message look like this instead: BTRFS error (device sda2): errors: write 0, read 1, flush 0, corrupt 0, generation 0 Signed-off-by: Diego Calleja --- fs/btrfs/volumes.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2ceb924ca0d6..52fee5bb056f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -7238,9 +7238,8 @@ static void btrfs_dev_stat_print_on_error(struct btrfs_device *dev) { if (!dev->dev_stats_valid) return; - btrfs_err_rl_in_rcu(dev->fs_info, - "bdev %s errs: wr %u, rd %u, flush %u, corrupt %u, gen %u", - rcu_str_deref(dev->name), + btrfs_err_rl(dev->fs_info, + "errors: write %u, read %u, flush %u, corrupt %u, generation %u", btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_WRITE_ERRS), btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_READ_ERRS), btrfs_dev_stat_read(dev, BTRFS_DEV_STAT_FLUSH_ERRS),