diff mbox series

[12/14] dm-zoned: Reduce logging output on startup

Message ID 20200508090332.40716-13-hare@suse.de (mailing list archive)
State Superseded, archived
Delegated to: Mike Snitzer
Headers show
Series dm-zoned: metadata version 2 | expand

Commit Message

Hannes Reinecke May 8, 2020, 9:03 a.m. UTC
dm-zoned is becoming quite chatty during startup; reduce the noise
by moving some information to 'debug' level.

Suggested-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/md/dm-zoned-metadata.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Comments

Damien Le Moal May 11, 2020, 2:48 a.m. UTC | #1
On 2020/05/08 18:04, Hannes Reinecke wrote:
> dm-zoned is becoming quite chatty during startup; reduce the noise
> by moving some information to 'debug' level.
> 
> Suggested-by: Mike Snitzer <snitzer@redhat.com>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
>  drivers/md/dm-zoned-metadata.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
> index 77b9ea4bad74..80c0fe4c3546 100644
> --- a/drivers/md/dm-zoned-metadata.c
> +++ b/drivers/md/dm-zoned-metadata.c
> @@ -1279,8 +1279,8 @@ static int dmz_init_zones(struct dmz_metadata *zmd)
>  	if (!zmd->zones)
>  		return -ENOMEM;
>  
> -	DMINFO("(%s): Using %zu B for zone information",
> -	       zmd->devname, sizeof(struct dm_zone) * zmd->nr_zones);
> +	DMDEBUG("(%s): Using %zu B for zone information",
> +		zmd->devname, sizeof(struct dm_zone) * zmd->nr_zones);
>  
>  	/*
>  	 * Get zone information and initialize zone descriptors.  At the same
> @@ -2562,16 +2562,16 @@ int dmz_ctr_metadata(struct dmz_dev *dev, struct dmz_metadata **metadata,
>  
>  	dmz_zmd_info(zmd, "  %u zones of %llu 512-byte logical sectors",
>  		     zmd->nr_zones, (u64)zmd->zone_nr_sectors);
> -	dmz_zmd_info(zmd, "  %u metadata zones",
> -		     zmd->nr_meta_zones * 2);
> -	dmz_zmd_info(zmd, "  %u data zones for %u chunks",
> -		     zmd->nr_data_zones, zmd->nr_chunks);
> -	dmz_zmd_info(zmd, "    %u random zones (%u unmapped)",
> -		     zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd));
> -	dmz_zmd_info(zmd, "    %u sequential zones (%u unmapped)",
> -		     zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq));
> -	dmz_zmd_info(zmd, "  %u reserved sequential data zones",
> -		     zmd->nr_reserved_seq);
> +	dmz_zmd_debug(zmd, "  %u metadata zones",
> +		      zmd->nr_meta_zones * 2);
> +	dmz_zmd_debug(zmd, "  %u data zones for %u chunks",
> +		      zmd->nr_data_zones, zmd->nr_chunks);
> +	dmz_zmd_debug(zmd, "    %u random zones (%u unmapped)",
> +		      zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd));
> +	dmz_zmd_debug(zmd, "    %u sequential zones (%u unmapped)",
> +		      zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq));
> +	dmz_zmd_debug(zmd, "  %u reserved sequential data zones",
> +		      zmd->nr_reserved_seq);
>  	dmz_zmd_debug(zmd, "Format:");
>  	dmz_zmd_debug(zmd, "%u metadata blocks per set (%u max cache)",
>  		      zmd->nr_meta_blocks, zmd->max_nr_mblks);
> 

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
diff mbox series

Patch

diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
index 77b9ea4bad74..80c0fe4c3546 100644
--- a/drivers/md/dm-zoned-metadata.c
+++ b/drivers/md/dm-zoned-metadata.c
@@ -1279,8 +1279,8 @@  static int dmz_init_zones(struct dmz_metadata *zmd)
 	if (!zmd->zones)
 		return -ENOMEM;
 
-	DMINFO("(%s): Using %zu B for zone information",
-	       zmd->devname, sizeof(struct dm_zone) * zmd->nr_zones);
+	DMDEBUG("(%s): Using %zu B for zone information",
+		zmd->devname, sizeof(struct dm_zone) * zmd->nr_zones);
 
 	/*
 	 * Get zone information and initialize zone descriptors.  At the same
@@ -2562,16 +2562,16 @@  int dmz_ctr_metadata(struct dmz_dev *dev, struct dmz_metadata **metadata,
 
 	dmz_zmd_info(zmd, "  %u zones of %llu 512-byte logical sectors",
 		     zmd->nr_zones, (u64)zmd->zone_nr_sectors);
-	dmz_zmd_info(zmd, "  %u metadata zones",
-		     zmd->nr_meta_zones * 2);
-	dmz_zmd_info(zmd, "  %u data zones for %u chunks",
-		     zmd->nr_data_zones, zmd->nr_chunks);
-	dmz_zmd_info(zmd, "    %u random zones (%u unmapped)",
-		     zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd));
-	dmz_zmd_info(zmd, "    %u sequential zones (%u unmapped)",
-		     zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq));
-	dmz_zmd_info(zmd, "  %u reserved sequential data zones",
-		     zmd->nr_reserved_seq);
+	dmz_zmd_debug(zmd, "  %u metadata zones",
+		      zmd->nr_meta_zones * 2);
+	dmz_zmd_debug(zmd, "  %u data zones for %u chunks",
+		      zmd->nr_data_zones, zmd->nr_chunks);
+	dmz_zmd_debug(zmd, "    %u random zones (%u unmapped)",
+		      zmd->nr_rnd, atomic_read(&zmd->unmap_nr_rnd));
+	dmz_zmd_debug(zmd, "    %u sequential zones (%u unmapped)",
+		      zmd->nr_seq, atomic_read(&zmd->unmap_nr_seq));
+	dmz_zmd_debug(zmd, "  %u reserved sequential data zones",
+		      zmd->nr_reserved_seq);
 	dmz_zmd_debug(zmd, "Format:");
 	dmz_zmd_debug(zmd, "%u metadata blocks per set (%u max cache)",
 		      zmd->nr_meta_blocks, zmd->max_nr_mblks);