All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bcache: use pr_err instead of pr_notice if we are really error
@ 2021-10-20  2:13 Lin Feng
  2021-10-20 15:28 ` Coly Li
  0 siblings, 1 reply; 2+ messages in thread
From: Lin Feng @ 2021-10-20  2:13 UTC (permalink / raw)
  To: colyli, kent.overstreet; +Cc: linux-bcache, linux-kernel, linf

In bcache we have:
./bset.c:			pr_notice("loop %u, %llu per us\n", size,
./super.c:	pr_notice("error %s: %s\n", dc->backing_dev_name, err);
./super.c:		pr_notice("invalidating existing data\n");
./super.c:		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
./super.c:		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
./super.c:			pr_notice("Timeout waiting for devices to be closed\n");

and 3 sites with string 'error' are really error happening on device
register.

Signed-off-by: Lin Feng <linf@wangsu.com>
---
 drivers/md/bcache/super.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index f2874c77ff79..18a2e4bea9c2 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1493,7 +1493,7 @@ static int register_bdev(struct cache_sb *sb, struct cache_sb_disk *sb_disk,
 
 	return 0;
 err:
-	pr_notice("error %s: %s\n", dc->backing_dev_name, err);
+	pr_err("%s: %s\n", dc->backing_dev_name, err);
 	bcache_device_stop(&dc->disk);
 	return ret;
 }
@@ -2338,7 +2338,7 @@ static int cache_alloc(struct cache *ca)
 err_free:
 	module_put(THIS_MODULE);
 	if (err)
-		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
+		pr_err("%s: %s\n", ca->cache_dev_name, err);
 	return ret;
 }
 
@@ -2397,7 +2397,7 @@ static int register_cache(struct cache_sb *sb, struct cache_sb_disk *sb_disk,
 
 err:
 	if (err)
-		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
+		pr_err("%s: %s\n", ca->cache_dev_name, err);
 
 	return ret;
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bcache: use pr_err instead of pr_notice if we are really error
  2021-10-20  2:13 [PATCH] bcache: use pr_err instead of pr_notice if we are really error Lin Feng
@ 2021-10-20 15:28 ` Coly Li
  0 siblings, 0 replies; 2+ messages in thread
From: Coly Li @ 2021-10-20 15:28 UTC (permalink / raw)
  To: Lin Feng; +Cc: linux-bcache, linux-kernel, kent.overstreet

On 10/20/21 10:13 AM, Lin Feng wrote:
> In bcache we have:
> ./bset.c:			pr_notice("loop %u, %llu per us\n", size,
> ./super.c:	pr_notice("error %s: %s\n", dc->backing_dev_name, err);
> ./super.c:		pr_notice("invalidating existing data\n");
> ./super.c:		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
> ./super.c:		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
> ./super.c:			pr_notice("Timeout waiting for devices to be closed\n");
>
> and 3 sites with string 'error' are really error happening on device
> register.

It is fine to keep current dmesg level and message format.

Thanks.

Coly Li

>
> Signed-off-by: Lin Feng <linf@wangsu.com>
> ---
>   drivers/md/bcache/super.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index f2874c77ff79..18a2e4bea9c2 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -1493,7 +1493,7 @@ static int register_bdev(struct cache_sb *sb, struct cache_sb_disk *sb_disk,
>   
>   	return 0;
>   err:
> -	pr_notice("error %s: %s\n", dc->backing_dev_name, err);
> +	pr_err("%s: %s\n", dc->backing_dev_name, err);
>   	bcache_device_stop(&dc->disk);
>   	return ret;
>   }
> @@ -2338,7 +2338,7 @@ static int cache_alloc(struct cache *ca)
>   err_free:
>   	module_put(THIS_MODULE);
>   	if (err)
> -		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
> +		pr_err("%s: %s\n", ca->cache_dev_name, err);
>   	return ret;
>   }
>   
> @@ -2397,7 +2397,7 @@ static int register_cache(struct cache_sb *sb, struct cache_sb_disk *sb_disk,
>   
>   err:
>   	if (err)
> -		pr_notice("error %s: %s\n", ca->cache_dev_name, err);
> +		pr_err("%s: %s\n", ca->cache_dev_name, err);
>   
>   	return ret;
>   }


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-20 15:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20  2:13 [PATCH] bcache: use pr_err instead of pr_notice if we are really error Lin Feng
2021-10-20 15:28 ` Coly Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.