Skip to content

Commit 65ca1ca

Browse files
Bart Van Asscheaxboe
authored andcommitted
blk-mq: Move the "state" debugfs attribute one level down
Move the "state" attribute from the top level to the "mq" directory as requested by Omar. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent e869b54 commit 65ca1ca

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

block/blk-mq-debugfs.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ static const struct file_operations blk_queue_flags_fops = {
141141
.write = blk_queue_flags_store,
142142
};
143143

144-
static const struct blk_mq_debugfs_attr blk_queue_attrs[] = {
145-
{"state", 0600, &blk_queue_flags_fops},
146-
{},
147-
};
148-
149144
static void print_stat(struct seq_file *m, struct blk_rq_stat *stat)
150145
{
151146
if (stat->nr_samples) {
@@ -757,6 +752,7 @@ static const struct file_operations ctx_completed_fops = {
757752

758753
static const struct blk_mq_debugfs_attr blk_mq_debugfs_queue_attrs[] = {
759754
{"poll_stat", 0400, &queue_poll_stat_fops},
755+
{"state", 0600, &blk_queue_flags_fops},
760756
{},
761757
};
762758

@@ -873,9 +869,6 @@ int blk_mq_debugfs_register_mq(struct request_queue *q)
873869
if (!q->debugfs_dir)
874870
return -ENOENT;
875871

876-
if (!debugfs_create_files(q->debugfs_dir, q, blk_queue_attrs))
877-
goto err;
878-
879872
q->mq_debugfs_dir = debugfs_create_dir("mq", q->debugfs_dir);
880873
if (!q->mq_debugfs_dir)
881874
goto err;

0 commit comments

Comments
 (0)