Thread (20 messages) 20 messages, 4 authors, 2021-06-03

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

From: Tejun Heo <tj@kernel.org>
Date: 2021-06-03 17:18:45
Also in: linux-nvme, linux-scsi

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help