Commit 6ac9311
blktrace: use existing disk debugfs directory
We may already have a directory to put the blktrace stuff in if
1. The disk uses blk-mq
2. CONFIG_BLK_DEBUG_FS is enabled
3. We are tracing the whole disk and not a partition
Instead of hardcoding this very specific case, let's use the new
debugfs_lookup(). If the directory exists, we use it, otherwise we
create one and clean it up later.
Fixes: 07e4fea ("blk-mq: create debugfs directory tree")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>1 parent 62ebce1 commit 6ac9311
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
478 | | - | |
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
520 | | - | |
| 520 | + | |
521 | 521 | | |
522 | | - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
| |||
0 commit comments