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]
Date:   Mon, 24 Jun 2019 18:50:03 +0200
From:   Jan Kara <jack@...e.cz>
To:     Tejun Heo <tj@...nel.org>
Cc:     dsterba@...e.com, clm@...com, josef@...icpanda.com,
        axboe@...nel.dk, jack@...e.cz, linux-btrfs@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
        kernel-team@...com
Subject: Re: [PATCH 3/9] blkcg, writeback: Implement wbc_blkcg_css()

On Sat 15-06-19 11:24:47, Tejun Heo wrote:
> Add a helper to determine the target blkcg from wbc.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reviewed-by: Josef Bacik <josef@...icpanda.com>

Looks good to me. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  include/linux/writeback.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/include/linux/writeback.h b/include/linux/writeback.h
> index b8f5f000cde4..800ee031e88a 100644
> --- a/include/linux/writeback.h
> +++ b/include/linux/writeback.h
> @@ -11,6 +11,7 @@
>  #include <linux/flex_proportions.h>
>  #include <linux/backing-dev-defs.h>
>  #include <linux/blk_types.h>
> +#include <linux/blk-cgroup.h>
>  
>  struct bio;
>  
> @@ -93,6 +94,16 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc)
>  	return 0;
>  }
>  
> +static inline struct cgroup_subsys_state *
> +wbc_blkcg_css(struct writeback_control *wbc)
> +{
> +#ifdef CONFIG_CGROUP_WRITEBACK
> +	if (wbc->wb)
> +		return wbc->wb->blkcg_css;
> +#endif
> +	return blkcg_root_css;
> +}
> +
>  /*
>   * A wb_domain represents a domain that wb's (bdi_writeback's) belong to
>   * and are measured against each other in.  There always is one global
> -- 
> 2.17.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ