• Omar Sandoval's avatar
    blktrace: use existing disk debugfs directory · 6ac93117
    Omar Sandoval authored
    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: 07e4fead ("blk-mq: create debugfs directory tree")
    Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    6ac93117
blktrace.c 41.9 KB