Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9981487ybi; Wed, 24 Jul 2019 13:29:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxO2JzjA3f6W6/Gj8ytd0zzoMXhWGjCXw5qlzK5lO/Cona9u1Mz15Z/58mwG1PPVacGYL7z X-Received: by 2002:a17:902:b08a:: with SMTP id p10mr88487178plr.83.1564000169693; Wed, 24 Jul 2019 13:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000169; cv=none; d=google.com; s=arc-20160816; b=tdXq2IDLX6QcfbifY7BihzDY1enXn8KxDEzASWmw+/K5kQccpjYhTyqzUGVSVCRRzq 5MW6NN7KrAW5UePo2AEXS78z6QabHQk6ss//1/Eb2EwHwKDkbXL1NRth94Y0JvkP9Hbd HvZxvugCHdUE2K9xk49cvkhoQLdOKnmxpn78tr2hYEzWbfd9Ju6DYGMeJAXc2ICGoCVE jqZsDQVLmWSuD7SjkoPzI61OR/DMZfU1ht7yxqrYvHKK7fnByUymenYZJi9ka3axTsK1 4TkceIiPsa+7uebv0Iy++6dmTRd15Z4g5IpJSRlU0Oxkcmrz9zeBMJIra/BxmjOROJcb 2ciw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SV2kz9sxYvbtx/BrVzplIuGtMpR1un57ecWc4RxgL6o=; b=dmYSzrp2wBjQwa8Xvj/DT3A6krW4NPbqRdUosEnQTcIe3EnFgMtsSHtjpmdo7qMYH2 Jjs0KebSaVxF/lYwqrplDanNa0Z2pRDMqrzt2F8tP75lndBrGbFmRWrXVduwsMmTt3/F qCRAE8HM7onhtt0c9tny0s0JV6qnyu7oCh9AKQ0TtgDGbC+aD0un6+i/DnGynwpA/LU+ cNYBx2a8BF9xPsOYBEFBEQJ/l8WiJYwN/mt29EEqWC+q8QurYgK6mcOWVSA+JGP6BjhZ OzUCEEhjDCxv5AKUPZ0HVAn/eC1TpIIb7HpAmNv1ru2UoBB05TvMmRLC1dqTuylN7H04 mKaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v5zsbV+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si16266763pga.567.2019.07.24.13.29.14; Wed, 24 Jul 2019 13:29:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v5zsbV+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389104AbfGXTgd (ORCPT + 99 others); Wed, 24 Jul 2019 15:36:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:36244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728976AbfGXTg3 (ORCPT ); Wed, 24 Jul 2019 15:36:29 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 223EB22ADA; Wed, 24 Jul 2019 19:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996988; bh=Tw8jnuM1i+2gm8nqa5LMXp0MFNQ7viicxBAZ92VgQOE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v5zsbV+cppRiN1/g0jvM4cqDGGgOm5tQLeRo1qT4Tn6zig6kFPT80PobkViPVIm23 KZPRiFwF2RJadi6SrxTfW2XZQZDD/fJ58b0sVDC7ZppF1s6TEEA2L8+L0rmIxI9hH4 LoAGL/0Cxtw8oAuBGH2NhBkuOCrC3s/c3lMfHUU4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Coly Li , Jens Axboe Subject: [PATCH 5.2 284/413] bcache: fix mistaken sysfs entry for io_error counter Date: Wed, 24 Jul 2019 21:19:35 +0200 Message-Id: <20190724191756.598510320@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Coly Li commit 5461999848e0462c14f306a62923d22de820a59c upstream. In bch_cached_dev_files[] from driver/md/bcache/sysfs.c, sysfs_errors is incorrectly inserted in. The correct entry should be sysfs_io_errors. This patch fixes the problem and now I/O errors of cached device can be read from /sys/block/bcache/bcache/io_errors. Fixes: c7b7bd07404c5 ("bcache: add io_disable to struct cached_dev") Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/md/bcache/sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/md/bcache/sysfs.c +++ b/drivers/md/bcache/sysfs.c @@ -182,7 +182,7 @@ SHOW(__bch_cached_dev) var_print(writeback_percent); sysfs_hprint(writeback_rate, wb ? atomic_long_read(&dc->writeback_rate.rate) << 9 : 0); - sysfs_hprint(io_errors, atomic_read(&dc->io_errors)); + sysfs_printf(io_errors, "%i", atomic_read(&dc->io_errors)); sysfs_printf(io_error_limit, "%i", dc->error_limit); sysfs_printf(io_disable, "%i", dc->io_disable); var_print(writeback_rate_update_seconds); @@ -474,7 +474,7 @@ static struct attribute *bch_cached_dev_ &sysfs_writeback_rate_p_term_inverse, &sysfs_writeback_rate_minimum, &sysfs_writeback_rate_debug, - &sysfs_errors, + &sysfs_io_errors, &sysfs_io_error_limit, &sysfs_io_disable, &sysfs_dirty_data,