From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AAD1314A98 for ; Thu, 14 May 2026 17:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778781523; cv=none; b=B5B/EAxF1ZeiiaA/y1CBn1VpWONeZyspeYcn5L3UeULjI1sUaLl3o43/y008JiUKGXR1ylInQIBJdg/hRvwvSlsbfSRWODt65t/lN8GwD28RfR5itI6pvd7v01TTEdD1VcCe39UMs2Opos9mpFWhkWWD3o4rp1sxCZ/zvpt4ycQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778781523; c=relaxed/simple; bh=B0nxqiS9+6QnO3DhXgmvenr0ohJny3FOmT1EQj8wiSs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nFDk0zeZaD8380SSTDH6dOFv0b8hUDKJTVnxzp1Uu744caAty6YrOWaorGY7+tD8BZoo5zzYCtLn9leXslbJqNP4DgOATp3M5XVX+OnIYlOscbzqTCGEhe4n5ew6CzITxXTPov3TnFPuF5aijG1OdIBPtVQZfMYVZV7ohQcSPdk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U9I5p9CL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U9I5p9CL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A963CC2BCB3; Thu, 14 May 2026 17:58:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778781522; bh=B0nxqiS9+6QnO3DhXgmvenr0ohJny3FOmT1EQj8wiSs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U9I5p9CLXvKntM8QXc7++CacNbXJHTNsi+GBGSzDfxj8fAuIDPJ/InRwrloRBw2Ub Cg7mpDD5Wcd1FSEjIutG2bwfa8t2PJ79LOPa08V9wPfH3d4s0790JPjM2XysjwKbzO z1KnTNzeI7jAqUh++wDvK/fiLeXKawjXLS8CGuxhku4od2idOed6AsUJvpN5JrUcE3 QuLL3RKoeUOXFyz1N7XweG30elq+IwQV8jnfQebmKuOi4uzNhmAF00rLvCr25viUoY AH8hiHE9akaG1975VRehk0t0q7kmMuicO78sIWKMYyKU/7aKCBpDFkils6dFPAqtVk Em3C00PMr6KRg== From: Sasha Levin To: stable@vger.kernel.org Cc: Damien Le Moal , Christoph Hellwig , Bart Van Assche , Johannes Thumshirn , Chaitanya Kulkarni , Hannes Reinecke , "Martin K. Petersen" , Jens Axboe , Sasha Levin Subject: [PATCH 6.12.y 2/3] block: reorganize struct blk_zone_wplug Date: Thu, 14 May 2026 13:58:36 -0400 Message-ID: <20260514175837.526481-2-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260514175837.526481-1-sashal@kernel.org> References: <2026051255-scale-proactive-9452@gregkh> <20260514175837.526481-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Damien Le Moal [ Upstream commit ca1a897fb266c4b23b5ecb99fe787ed18559057d ] Reorganize the fields of struct blk_zone_wplug to remove a hole after the wp_offset field and avoid having the bio_work structure split between 2 cache lines. No functional changes. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe Stable-dep-of: b7d4ffb51037 ("block: fix zone write plug removal") Signed-off-by: Sasha Levin --- block/blk-zoned.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/block/blk-zoned.c b/block/blk-zoned.c index c9b5b590400ab..5eaf185004df4 100644 --- a/block/blk-zoned.c +++ b/block/blk-zoned.c @@ -41,6 +41,11 @@ static const char *const zone_cond_name[] = { /* * Per-zone write plug. * @node: hlist_node structure for managing the plug using a hash table. + * @bio_list: The list of BIOs that are currently plugged. + * @bio_work: Work struct to handle issuing of plugged BIOs + * @rcu_head: RCU head to free zone write plugs with an RCU grace period. + * @disk: The gendisk the plug belongs to. + * @lock: Spinlock to atomically manipulate the plug. * @ref: Zone write plug reference counter. A zone write plug reference is * always at least 1 when the plug is hashed in the disk plug hash table. * The reference is incremented whenever a new BIO needing plugging is @@ -50,27 +55,22 @@ static const char *const zone_cond_name[] = { * reference is dropped whenever the zone of the zone write plug is reset, * finished and when the zone becomes full (last write BIO to the zone * completes). - * @lock: Spinlock to atomically manipulate the plug. * @flags: Flags indicating the plug state. * @zone_no: The number of the zone the plug is managing. * @wp_offset: The zone write pointer location relative to the start of the zone * as a number of 512B sectors. - * @bio_list: The list of BIOs that are currently plugged. - * @bio_work: Work struct to handle issuing of plugged BIOs - * @rcu_head: RCU head to free zone write plugs with an RCU grace period. - * @disk: The gendisk the plug belongs to. */ struct blk_zone_wplug { struct hlist_node node; - refcount_t ref; - spinlock_t lock; - unsigned int flags; - unsigned int zone_no; - unsigned int wp_offset; struct bio_list bio_list; struct work_struct bio_work; struct rcu_head rcu_head; struct gendisk *disk; + spinlock_t lock; + refcount_t ref; + unsigned int flags; + unsigned int zone_no; + unsigned int wp_offset; }; static inline unsigned int disk_zone_wplugs_hash_size(struct gendisk *disk) -- 2.53.0