From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388008; b=ydOgGwEFm3FCD+Q+B8BvrPV7Ysewrn1O4cucEgOVT4MrVCMYHwTKThZGJNrMdU2lUoDM p7vLP4mWDtPMHror9mwJ+FdpzfUmbG8dY4MTGiUp3ziw3iM8mGr1m6oA1fI5a7kjZJBzO XPST7mPJDiqRFCYyo0PEeIEpA620n3QJLeTsRDW2oJ/X3jRZmBfFPTaC2IbI7BkXZNBX5 mQq/eqd9W08hbIrUgI8vk5yNXa6MskgvFksc41s4SAiZCgsdDaiZ3VFOVsqdxiqiyTDYs VLz60ppn5yHA7PvQO8ytmISbP3Lj8ji/qfcEyQ94yUwRqjYBFXxFM1eYsRK8eN5nlSQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388008; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=TD7lmbuh1SnJtiW3aK5sqrdN8XYzP/aCLi4FtLI1enY=; b=Bp14QkSHL1wJi3v5YKUFr3NBr+0WEBVQfma1cb+bOGLaZkKhryW4dKpf5FZkRADcDCgQ mS72bhTH5UIbF1Fby3A2YEmhZTWQO8aVvl/rhlwFkubuGxJ8nsI/PioaaV6EBvsSWMY3/ ZlZzGpvIeg9yQSoOlOljnUEODSVbRteflKJNc4ICQO07kyPvryJa+WlgbZDlc9DmYMjAE kRWFKE0wi5BUiFdTeGE8ry7oma3qZ9eLN5Hx0o9YIR3eLWlpOUraGQDVSGsm5dB0Ib7MD 6ZOjsTjZm645ZhY8CUkwChbZ9lhVh8oKcIwXheRtFxZaql0igZV3qbvgqzpPdy936Qg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sqnKTJU6; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CB41606A332; Fri, 4 Dec 2026 12:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=sqnKTJU6 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF06C1F00934; Fri, 4 Dec 2026 12:40:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388008; bh=TD7lmbuh1SnJtiW3aK5sqrdN8XYzP/aCLi4FtLI1enY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sqnKTJU6ZccjxuGrdt4wIrqEOC7td41qSdm7P0wQ4HWUB1gaYYgjteLuhAuzYnMG2 sM0rcaAPTPNHP6Wbye1abVb5GTO0nR5q/CgyHPtN9G8Re3duOwIgVUniD3CbqbuwoL ci/f19L7+OJasNC/9M0rjGIozmHRSlWqKkwK54yU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tejun Heo , Josef Bacik , Jens Axboe , Sasha Levin Subject: [PATCH 6.1 0447/1059] blk-throttle: pass the I/O counts of a dead group on Date: Fri, 4 Dec 2026 18:59:38 +0900 Message-ID: <20261204100655.878583549@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik [ Upstream commit 587edb931fdda032bcd63fdfb0db4ded75159ee9 ] The recursive io_service_bytes and io_serviced files sum up the online groups plus what dead descendants left in aux_cnt. That worked while the counters lived in the blkg. Since commit 7ca464383aec they're in the throtl_grp and nobody passes them up, so the files go backwards when a child is removed. Add them to the parent in throtl_pd_offline(). Fixes: 7ca464383aec ("blk-throtl: stop using blkg->stat_bytes and ->stat_ios") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-26-axboe@kernel.dk Signed-off-by: Jens Axboe [ sashal: Moved the stat propagation into this tree's throtl_pd_offline(), which has no tg_flush_bios(), adding a parent local and placing the block at the top before the existing limit-clearing code. ] Signed-off-by: Sasha Levin --- block/blk-throttle.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/block/blk-throttle.c b/block/blk-throttle.c index 084ae45efd118..869c92ab87c59 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c @@ -474,6 +474,15 @@ static void throtl_upgrade_state(struct throtl_data *td); static void throtl_pd_offline(struct blkg_policy_data *pd) { struct throtl_grp *tg = pd_to_tg(pd); + struct throtl_grp *parent = blkg_to_tg(tg_to_blkg(tg)->parent); + + /* the recursive files of the ancestors go on counting what it did */ + if (parent) { + blkg_rwstat_add_aux(&parent->stat_bytes, &tg->stat_bytes); + blkg_rwstat_add_aux(&parent->stat_ios, &tg->stat_ios); + blkg_rwstat_reset(&tg->stat_bytes); + blkg_rwstat_reset(&tg->stat_ios); + } tg->bps[READ][LIMIT_LOW] = 0; tg->bps[WRITE][LIMIT_LOW] = 0; -- 2.53.0