Skip to contentSkip to conversation

block: Document the role of the two attribute groups

PATCH Applied Bart Van Assche 2 participants 2 messages Nov 28, 2023 – Nov 29, 2023 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Document the role of the two attribute groups

It is nontrivial to derive the role of the two attribute groups in source file block/blk-sysfs.c. Hence add a comment that explains their roles. See also commit 6d85ebf95c44 ("blk-sysfs: add a new attr_group for blk_mq").

Cc Christoph Hellwig <[email protected]>
Cc Yu Kuai <[email protected]>
---
 block/blk-sysfs.c | 2 ++
 1 file changed, 2 insertions(+)
block/blk-sysfs.c +2 -0
index 63e481262336..0b2d04766324 100644
@@ -615,6 +615,7 @@ static ssize_t queue_wb_lat_store(struct request_queue *q, const char *page,
 QUEUE_RW_ENTRY(queue_wb_lat, "wbt_lat_usec");
 #endif
 
+/* Common attributes for bio-based and request-based queues. */
 static struct attribute *queue_attrs[] = {
 	&queue_ra_entry.attr,
 	&queue_max_hw_sectors_entry.attr,
@@ -659,6 +660,7 @@ static struct attribute *queue_attrs[] = {
 	NULL,
 };
 
+/* Request-based queue attributes that are not relevant for bio-based queues. */
 static struct attribute *blk_mq_queue_attrs[] = {
 	&queue_requests_entry.attr,
 	&elv_iosched_entry.attr,
maintainer Applied
#1 lore raw
Quoted 5 lines · Bart Van Assche

It is nontrivial to derive the role of the two attribute groups in source file block/blk-sysfs.c. Hence add a comment that explains their roles. See also commit 6d85ebf95c44 ("blk-sysfs: add a new attr_group for blk_mq").

Applied, thanks!

[1/1] block: Document the role of the two attribute groups

      commit: 3649ff0a0b152b5f00e8f56a5ce0da0945aae278

Best regards,

Signature · 1 line
Jens Axboe