public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
@ 2022-05-19 13:02 Hannes Reinecke
  2022-05-19 13:36 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Hannes Reinecke @ 2022-05-19 13:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, Keith Busch, linux-block, Hannes Reinecke

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 include/linux/blk-cgroup.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 9f40dbc65f82..4756f4d2b8e7 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -33,6 +33,9 @@ void blkcg_unpin_online(struct cgroup_subsys_state *blkcg_css);
 struct list_head *blkcg_get_cgwb_list(struct cgroup_subsys_state *css);
 struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio);
 
+int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);
+char *blkcg_get_fc_appid(struct bio *bio);
+
 #else	/* CONFIG_BLK_CGROUP */
 
 #define blkcg_root_css	((struct cgroup_subsys_state *)ERR_PTR(-EINVAL))
@@ -44,9 +47,15 @@ static inline struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio)
 {
 	return NULL;
 }
+static inline int blkcg_set_fc_appid(char *app_id, u64 cgrp_id,
+				     size_t app_id_len)
+{
+	return -EINVAL;
+}
+static inline char *blkcg_get_fc_appid(struct bio *bio)
+{
+	return NULL;
+}
 #endif	/* CONFIG_BLK_CGROUP */
 
-int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);
-char *blkcg_get_fc_appid(struct bio *bio);
-
 #endif	/* _BLK_CGROUP_H */
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
  2022-05-19 13:02 Hannes Reinecke
@ 2022-05-19 13:36 ` Jens Axboe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2022-05-19 13:36 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Keith Busch, linux-block

On 5/19/22 7:02 AM, Hannes Reinecke wrote:
> Signed-off-by: Hannes Reinecke <hare@suse.de>

This needs both an actual commit message and a Fixes tag.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
@ 2022-05-19 14:00 Hannes Reinecke
  2022-05-19 14:08 ` Christoph Hellwig
  2022-05-19 14:25 ` Jens Axboe
  0 siblings, 2 replies; 7+ messages in thread
From: Hannes Reinecke @ 2022-05-19 14:00 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christoph Hellwig, Keith Busch, linux-block, James Smart,
	linux-scsi, Hannes Reinecke

Provide stubs for blkcg_set_fc_appid() and  blkcg_get_fc_appid() to allow
for compilation with cgroups disabled.

Fixes: db05628435aa ("blk-cgroup: move blkcg_{get,set}_fc_appid out of line")
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 include/linux/blk-cgroup.h | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 9f40dbc65f82..4756f4d2b8e7 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -33,6 +33,9 @@ void blkcg_unpin_online(struct cgroup_subsys_state *blkcg_css);
 struct list_head *blkcg_get_cgwb_list(struct cgroup_subsys_state *css);
 struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio);
 
+int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);
+char *blkcg_get_fc_appid(struct bio *bio);
+
 #else	/* CONFIG_BLK_CGROUP */
 
 #define blkcg_root_css	((struct cgroup_subsys_state *)ERR_PTR(-EINVAL))
@@ -44,9 +47,15 @@ static inline struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio)
 {
 	return NULL;
 }
+static inline int blkcg_set_fc_appid(char *app_id, u64 cgrp_id,
+				     size_t app_id_len)
+{
+	return -EINVAL;
+}
+static inline char *blkcg_get_fc_appid(struct bio *bio)
+{
+	return NULL;
+}
 #endif	/* CONFIG_BLK_CGROUP */
 
-int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);
-char *blkcg_get_fc_appid(struct bio *bio);
-
 #endif	/* _BLK_CGROUP_H */
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
  2022-05-19 14:00 [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid() Hannes Reinecke
@ 2022-05-19 14:08 ` Christoph Hellwig
  2022-05-19 14:20   ` Hannes Reinecke
  2022-05-19 14:25 ` Jens Axboe
  1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2022-05-19 14:08 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Jens Axboe, Christoph Hellwig, Keith Busch, linux-block,
	James Smart, linux-scsi

On Thu, May 19, 2022 at 04:00:21PM +0200, Hannes Reinecke wrote:
> Provide stubs for blkcg_set_fc_appid() and  blkcg_get_fc_appid() to allow
> for compilation with cgroups disabled.
> 
> Fixes: db05628435aa ("blk-cgroup: move blkcg_{get,set}_fc_appid out of line")
> Signed-off-by: Hannes Reinecke <hare@suse.de>

No, it does not fix that commit, which is perfectly fine.  It fixes
the recently added second caller of blkcg_get_fc_appid, and James
has just resent a new version of that which fixes this properly.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
  2022-05-19 14:08 ` Christoph Hellwig
@ 2022-05-19 14:20   ` Hannes Reinecke
  2022-05-19 14:34     ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Hannes Reinecke @ 2022-05-19 14:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jens Axboe, Keith Busch, linux-block, James Smart, linux-scsi

On 5/19/22 07:08, Christoph Hellwig wrote:
> On Thu, May 19, 2022 at 04:00:21PM +0200, Hannes Reinecke wrote:
>> Provide stubs for blkcg_set_fc_appid() and  blkcg_get_fc_appid() to allow
>> for compilation with cgroups disabled.
>>
>> Fixes: db05628435aa ("blk-cgroup: move blkcg_{get,set}_fc_appid out of line")
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
> 
> No, it does not fix that commit, which is perfectly fine.  It fixes
> the recently added second caller of blkcg_get_fc_appid, and James
> has just resent a new version of that which fixes this properly.

Really? blk-cgroup.h provides the function declaration
blkcg_get_fc_appid() unconditionally, but the implementation
for blkcg_get_fc_appid() depends on CONFIG_CGROUP.
Neither of which is changed by James patchset.

And besides, the first version is already merged.

Am I missing something?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
  2022-05-19 14:00 [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid() Hannes Reinecke
  2022-05-19 14:08 ` Christoph Hellwig
@ 2022-05-19 14:25 ` Jens Axboe
  1 sibling, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2022-05-19 14:25 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Keith Busch, linux-block, James Smart,
	linux-scsi

On 5/19/22 8:00 AM, Hannes Reinecke wrote:
> Provide stubs for blkcg_set_fc_appid() and  blkcg_get_fc_appid() to allow
> for compilation with cgroups disabled.
> 
> Fixes: db05628435aa ("blk-cgroup: move blkcg_{get,set}_fc_appid out of line")

This isn't a valid sha.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid()
  2022-05-19 14:20   ` Hannes Reinecke
@ 2022-05-19 14:34     ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2022-05-19 14:34 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Keith Busch, linux-block,
	James Smart, linux-scsi

On Thu, May 19, 2022 at 04:20:40PM +0200, Hannes Reinecke wrote:
>>
>> No, it does not fix that commit, which is perfectly fine.  It fixes
>> the recently added second caller of blkcg_get_fc_appid, and James
>> has just resent a new version of that which fixes this properly.
>
> Really? blk-cgroup.h provides the function declaration
> blkcg_get_fc_appid() unconditionally, but the implementation
> for blkcg_get_fc_appid() depends on CONFIG_CGROUP.

Take a look at the IS_ENABLED macro that we have for a few years now.

> Neither of which is changed by James patchset.
>
> And besides, the first version is already merged.
>
> Am I missing something?

https://lore.kernel.org/linux-scsi/20220519123110.17361-1-jsmart2021@gmail.com/T/#t


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-05-19 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-19 14:00 [PATCH] blk-cgroup: provide stubs for blkcg_get_fc_appid() Hannes Reinecke
2022-05-19 14:08 ` Christoph Hellwig
2022-05-19 14:20   ` Hannes Reinecke
2022-05-19 14:34     ` Christoph Hellwig
2022-05-19 14:25 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2022-05-19 13:02 Hannes Reinecke
2022-05-19 13:36 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox