blk-mq-debugfs.c (c0cb1c6d39060ce04470b10347b7b6f1df77bef5) | blk-mq-debugfs.c (8ef1a191038c138d5675933cd69d47747d0d396b) |
---|---|
1/* 2 * Copyright (C) 2017 Facebook 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 294 unchanged lines hidden (view full) --- 303EXPORT_SYMBOL_GPL(__blk_mq_debugfs_rq_show); 304 305int blk_mq_debugfs_rq_show(struct seq_file *m, void *v) 306{ 307 return __blk_mq_debugfs_rq_show(m, list_entry_rq(v)); 308} 309EXPORT_SYMBOL_GPL(blk_mq_debugfs_rq_show); 310 | 1/* 2 * Copyright (C) 2017 Facebook 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public 6 * License v2 as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, --- 294 unchanged lines hidden (view full) --- 303EXPORT_SYMBOL_GPL(__blk_mq_debugfs_rq_show); 304 305int blk_mq_debugfs_rq_show(struct seq_file *m, void *v) 306{ 307 return __blk_mq_debugfs_rq_show(m, list_entry_rq(v)); 308} 309EXPORT_SYMBOL_GPL(blk_mq_debugfs_rq_show); 310 |
311static void *queue_requeue_list_start(struct seq_file *m, loff_t *pos) 312 __acquires(&q->requeue_lock) 313{ 314 struct request_queue *q = m->private; 315 316 spin_lock_irq(&q->requeue_lock); 317 return seq_list_start(&q->requeue_list, *pos); 318} 319 320static void *queue_requeue_list_next(struct seq_file *m, void *v, loff_t *pos) 321{ 322 struct request_queue *q = m->private; 323 324 return seq_list_next(v, &q->requeue_list, pos); 325} 326 327static void queue_requeue_list_stop(struct seq_file *m, void *v) 328 __releases(&q->requeue_lock) 329{ 330 struct request_queue *q = m->private; 331 332 spin_unlock_irq(&q->requeue_lock); 333} 334 335static const struct seq_operations queue_requeue_list_seq_ops = { 336 .start = queue_requeue_list_start, 337 .next = queue_requeue_list_next, 338 .stop = queue_requeue_list_stop, 339 .show = blk_mq_debugfs_rq_show, 340}; 341 |
|
311static void *hctx_dispatch_start(struct seq_file *m, loff_t *pos) 312 __acquires(&hctx->lock) 313{ 314 struct blk_mq_hw_ctx *hctx = m->private; 315 316 spin_lock(&hctx->lock); 317 return seq_list_start(&hctx->dispatch, *pos); 318} --- 341 unchanged lines hidden (view full) --- 660 .read = seq_read, 661 .write = blk_mq_debugfs_write, 662 .llseek = seq_lseek, 663 .release = blk_mq_debugfs_release, 664}; 665 666static const struct blk_mq_debugfs_attr blk_mq_debugfs_queue_attrs[] = { 667 {"poll_stat", 0400, queue_poll_stat_show}, | 342static void *hctx_dispatch_start(struct seq_file *m, loff_t *pos) 343 __acquires(&hctx->lock) 344{ 345 struct blk_mq_hw_ctx *hctx = m->private; 346 347 spin_lock(&hctx->lock); 348 return seq_list_start(&hctx->dispatch, *pos); 349} --- 341 unchanged lines hidden (view full) --- 691 .read = seq_read, 692 .write = blk_mq_debugfs_write, 693 .llseek = seq_lseek, 694 .release = blk_mq_debugfs_release, 695}; 696 697static const struct blk_mq_debugfs_attr blk_mq_debugfs_queue_attrs[] = { 698 {"poll_stat", 0400, queue_poll_stat_show}, |
699 {"requeue_list", 0400, .seq_ops = &queue_requeue_list_seq_ops}, |
|
668 {"state", 0600, queue_state_show, queue_state_write}, 669 {}, 670}; 671 672static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = { 673 {"state", 0400, hctx_state_show}, 674 {"flags", 0400, hctx_flags_show}, 675 {"dispatch", 0400, .seq_ops = &hctx_dispatch_seq_ops}, --- 214 unchanged lines hidden --- | 700 {"state", 0600, queue_state_show, queue_state_write}, 701 {}, 702}; 703 704static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = { 705 {"state", 0400, hctx_state_show}, 706 {"flags", 0400, hctx_flags_show}, 707 {"dispatch", 0400, .seq_ops = &hctx_dispatch_seq_ops}, --- 214 unchanged lines hidden --- |