From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C68D6C433F5 for ; Mon, 31 Jan 2022 11:11:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358389AbiAaLLP (ORCPT ); Mon, 31 Jan 2022 06:11:15 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:42528 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376472AbiAaLIb (ORCPT ); Mon, 31 Jan 2022 06:08:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4C80260ED0; Mon, 31 Jan 2022 11:08:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C09BC340E8; Mon, 31 Jan 2022 11:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643627310; bh=wsjXSY83kKhGWgpVCYF+AoAjFAC151aK3PK4irW1rok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZP+HQ3YOiZr5UUMRLcyP/K31hK+m4LbBIj3qpiw7as3PrqtuH6KJ0Rww38u2Aicot jZx6HP58zFXS2p74yx7ie8V1NQejJSKIVn6e//L53zIk7Luj2GyH2MzTXyB97a3SXW 3tE2/tgPeM5vE5tBf3AQBQTwgRYSxa0LyE1k+YGI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Snitzer , Jens Axboe Subject: [PATCH 5.15 043/171] dm: revert partial fix for redundant bio-based IO accounting Date: Mon, 31 Jan 2022 11:55:08 +0100 Message-Id: <20220131105231.485368692@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220131105229.959216821@linuxfoundation.org> References: <20220131105229.959216821@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mike Snitzer commit f524d9c95fab54783d0038f7a3e8c014d5b56857 upstream. Reverts a1e1cb72d9649 ("dm: fix redundant IO accounting for bios that need splitting") because it was too narrow in scope (only addressed redundant 'sectors[]' accounting and not ios, nsecs[], etc). Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer Link: https://lore.kernel.org/r/20220128155841.39644-3-snitzer@redhat.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm.c | 15 --------------- 1 file changed, 15 deletions(-) --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1514,9 +1514,6 @@ static void init_clone_info(struct clone ci->sector = bio->bi_iter.bi_sector; } -#define __dm_part_stat_sub(part, field, subnd) \ - (part_stat_get(part, field) -= (subnd)) - /* * Entry point to split a bio into clones and submit them to the targets. */ @@ -1553,18 +1550,6 @@ static blk_qc_t __split_and_process_bio( GFP_NOIO, &md->queue->bio_split); ci.io->orig_bio = b; - /* - * Adjust IO stats for each split, otherwise upon queue - * reentry there will be redundant IO accounting. - * NOTE: this is a stop-gap fix, a proper fix involves - * significant refactoring of DM core's bio splitting - * (by eliminating DM's splitting and just using bio_split) - */ - part_stat_lock(); - __dm_part_stat_sub(dm_disk(md)->part0, - sectors[op_stat_group(bio_op(bio))], ci.sector_count); - part_stat_unlock(); - bio_chain(b, bio); trace_block_split(b, bio->bi_iter.bi_sector); ret = submit_bio_noacct(bio);