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

Tejun Heo
2021-06-03T17:18:47Z

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@kernel.org>

Thanks.

--
tejun