diff mbox series

[v7,4/4] dm: Remove unused macro DM_ZONE_INVALID_WP_OFST

Message ID 20240610075655.249301-5-dlemoal@kernel.org (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show
Series Fix DM zone resource limits stacking | expand

Commit Message

Damien Le Moal June 10, 2024, 7:56 a.m. UTC
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(-)

Comments

Damien Le Moal June 11, 2024, 2:31 a.m. UTC | #1
On 6/10/24 4:56 PM, Damien Le Moal wrote:
> 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;
> +

Jens,

I messed up the rebase for v7: this hunk belongs to patch 3.
So I will resend a V8. My apologies for the churn.

>  	return 0;
>  }
>
diff mbox series

Patch

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;
 }