From: Damien Le Moal <dlemoal@kernel.org>
To: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, dm-devel@lists.linux.dev,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, Benjamin Marzinski <bmarzins@redhat.com>
Subject: [PATCH v7 4/4] dm: Remove unused macro DM_ZONE_INVALID_WP_OFST
Date: Mon, 10 Jun 2024 16:56:55 +0900 [thread overview]
Message-ID: <20240610075655.249301-5-dlemoal@kernel.org> (raw)
In-Reply-To: <20240610075655.249301-1-dlemoal@kernel.org>
With the switch to using the zone append emulation of the block layer
zone write plugging, the macro DM_ZONE_INVALID_WP_OFST is no longer used
in dm-zone.c. Remove its definition.
Fixes: f211268ed1f9 ("dm: Use the block layer zone append emulation")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
---
drivers/md/dm-zone.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c
index d9f8b7c0957a..70719bf32a2e 100644
--- a/drivers/md/dm-zone.c
+++ b/drivers/md/dm-zone.c
@@ -13,8 +13,6 @@
#define DM_MSG_PREFIX "zone"
-#define DM_ZONE_INVALID_WP_OFST UINT_MAX
-
/*
* For internal zone reports bypassing the top BIO submission path.
*/
@@ -285,8 +283,6 @@ static int device_get_zone_resource_limits(struct dm_target *ti,
return ret;
}
- zlim->mapped_nr_seq_zones += zc.target_nr_seq_zones;
-
/*
* If the target does not map any sequential zones, then we do not need
* any zone resource limits.
@@ -317,6 +313,13 @@ static int device_get_zone_resource_limits(struct dm_target *ti,
zlim->lim->max_open_zones =
min_not_zero(max_open_zones, zlim->lim->max_open_zones);
+ /*
+ * Also count the total number of sequential zones for the mapped
+ * device so that when we are done inspecting all its targets, we are
+ * able to check if the mapped device actually has any sequential zones.
+ */
+ zlim->mapped_nr_seq_zones += zc.target_nr_seq_zones;
+
return 0;
}
--
2.45.2
next prev parent reply other threads:[~2024-06-10 7:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 7:56 [PATCH v7 0/4] Fix DM zone resource limits stacking Damien Le Moal
2024-06-10 7:56 ` [PATCH v7 1/4] block: Improve checks on zone resource limits Damien Le Moal
2024-06-10 7:56 ` [PATCH v7 2/4] dm: Call dm_revalidate_zones() after setting the queue limits Damien Le Moal
2024-06-10 7:56 ` [PATCH v7 3/4] dm: Improve zone resource limits handling Damien Le Moal
2024-06-10 7:56 ` Damien Le Moal [this message]
2024-06-11 2:31 ` [PATCH v7 4/4] dm: Remove unused macro DM_ZONE_INVALID_WP_OFST Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240610075655.249301-5-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=axboe@kernel.dk \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).