[v2,1/3] btrfs-progs: fi usage: change warning message more appropriately
diff mbox

Message ID 1a534c1e-4223-f5fd-89a3-dd97ed79a0da@jp.fujitsu.com
State New
Headers show

Commit Message

Misono Tomohiro Nov. 30, 2017, 8:29 a.m. UTC
"fi usage" shows the warning "RAID5/6 numbers will be incorrect" when
runnning without root privilege even if raid5/6 is not used.  What
happens is it cannot get the per device profile usage info, so change
the message more appropriately.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
---
v1 -> v2: fix not to split message line

 cmds-fi-usage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Qu Wenruo Nov. 30, 2017, 8:38 a.m. UTC | #1
On 2017年11月30日 16:29, Misono, Tomohiro wrote:
> "fi usage" shows the warning "RAID5/6 numbers will be incorrect" when
> runnning without root privilege even if raid5/6 is not used.  What
> happens is it cannot get the per device profile usage info, so change
> the message more appropriately.
> 
> Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
> v1 -> v2: fix not to split message line
> 
>  cmds-fi-usage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c
> index 6c846c15..2f3d57e3 100644
> --- a/cmds-fi-usage.c
> +++ b/cmds-fi-usage.c
> @@ -590,7 +590,7 @@ int load_chunk_and_device_info(int fd, struct chunk_info **chunkinfo,
>  	ret = load_chunk_info(fd, chunkinfo, chunkcount);
>  	if (ret == -EPERM) {
>  		warning(
> -"cannot read detailed chunk info, RAID5/6 numbers will be incorrect, run as root");
> +"cannot read detailed chunk info. per device usage will not be shown, run as root");
>  	} else if (ret) {
>  		return ret;
>  	}
>

Patch
diff mbox

diff --git a/cmds-fi-usage.c b/cmds-fi-usage.c
index 6c846c15..2f3d57e3 100644
--- a/cmds-fi-usage.c
+++ b/cmds-fi-usage.c
@@ -590,7 +590,7 @@  int load_chunk_and_device_info(int fd, struct chunk_info **chunkinfo,
 	ret = load_chunk_info(fd, chunkinfo, chunkcount);
 	if (ret == -EPERM) {
 		warning(
-"cannot read detailed chunk info, RAID5/6 numbers will be incorrect, run as root");
+"cannot read detailed chunk info. per device usage will not be shown, run as root");
 	} else if (ret) {
 		return ret;
 	}