lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <085442bc-68c8-4d91-952f-c321c4d81825@huaweicloud.com>
Date: Tue, 23 Apr 2024 11:53:45 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: akpm@...ux-foundation.org, willy@...radead.org, jack@...e.cz,
 bfoster@...hat.com, tj@...nel.org
Cc: dsterba@...e.com, mjguzik@...il.com, dhowells@...hat.com,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 linux-fsdevel@...r.kernel.org, sj@...nel.org, sfr@...b.auug.org.au
Subject: Re: [PATCH v5 3/5] writeback: fix build problems of "writeback:
 support retrieving per group debug writeback stats of bdi"



on 4/23/2024 11:46 AM, Kemeng Shi wrote:
> Fix two build problems:
> 1. implicit declaration of function 'cgroup_ino'.
> 2. unused variable 'stats'.
> 
> After this fix, No build problem is found when CGROUPS is disabled.
> The wb_stats could be successfully retrieved when CGROUP_WRITEBACK is
> disabled:
> cat wb_stats
> WbCgIno:                    1
> WbWriteback:                0 kB
> WbReclaimable:         685440 kB
> WbDirtyThresh:      195530960 kB
> WbDirtied:             691488 kB
> WbWritten:               6048 kB
> WbWriteBandwidth:      102400 kBps
> b_dirty:                    2
> b_io:                       0
> b_more_io:                  0
> b_dirty_time:               0
> state:                      5
> 
> cat wb_stats
> WbCgIno:                    1
> WbWriteback:                0 kB
> WbReclaimable:         818944 kB
> WbDirtyThresh:      195527484 kB
> WbDirtied:             824992 kB
> WbWritten:               6048 kB
> WbWriteBandwidth:      102400 kBps
> b_dirty:                    2
> b_io:                       0
> b_more_io:                  0
> b_dirty_time:               0
> state:                      5
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
Reported-by: SeongJae Park <sj@...nel.org>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Sorry for missing reported-by tags.

> ---
>  mm/backing-dev.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index 6ecd11bdce6e..e61bbb1bd622 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -172,7 +172,11 @@ static void wb_stats_show(struct seq_file *m, struct bdi_writeback *wb,
>  		   "b_more_io:         %10lu\n"
>  		   "b_dirty_time:      %10lu\n"
>  		   "state:             %10lx\n\n",
> +#ifdef CONFIG_CGROUP_WRITEBACK
>  		   cgroup_ino(wb->memcg_css->cgroup),
> +#else
> +		   1ul,
> +#endif
>  		   K(stats->nr_writeback),
>  		   K(stats->nr_reclaimable),
>  		   K(stats->wb_thresh),
> @@ -192,7 +196,6 @@ static int cgwb_debug_stats_show(struct seq_file *m, void *v)
>  	unsigned long background_thresh;
>  	unsigned long dirty_thresh;
>  	struct bdi_writeback *wb;
> -	struct wb_stats stats;
>  
>  	global_dirty_limits(&background_thresh, &dirty_thresh);
>  
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ