[PATCH v10 02/13] blkcg: Added a app identifier support for blkcg

Tejun Heo tj at kernel.org
Thu Jun 3 10:15:34 PDT 2021


Hello,

On Wed, Apr 28, 2021 at 04:04:46AM +0530, Muneendra wrote:
...
> +static inline int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len)
> +{
...
> +	strlcpy(blkcg->fc_app_id, app_id, app_id_len);
> +}
...
> +static inline char *blkcg_get_fc_appid(struct bio *bio)
> +{
> +	if (bio && bio->bi_blkg &&
> +		(bio->bi_blkg->blkcg->fc_app_id[0] != '\0'))
> +		return bio->bi_blkg->blkcg->fc_app_id;
> +	return NULL;
> +}

So, there's reader-writer race here but if that's okay for the use case,
please note that with a comment. Otherwise:

Acked-by: Tejun Heo <tj at kernel.org>

Thanks.

-- 
tejun



More information about the Linux-nvme mailing list