Commit 2bfb89ac authored by Yu Kuai's avatar Yu Kuai
Browse files

blk-mq: export blk-mq-debugfs apis

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/IAGRKP


CVE: NA

--------------------------------

These apis will be used later to create new debugfs files. There are no
functional changes.

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
parent 7aa5db25
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -811,7 +811,7 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_ctx_attrs[] = {
	{},
};

static bool debugfs_create_files(struct dentry *parent, void *data,
bool debugfs_create_files(struct dentry *parent, void *data,
			  const struct blk_mq_debugfs_attr *attr)
{
	if (IS_ERR_OR_NULL(parent))
+9 −0
Original line number Diff line number Diff line
@@ -31,6 +31,15 @@ void blk_mq_debugfs_unregister_sched(struct request_queue *q);
int blk_mq_debugfs_register_sched_hctx(struct request_queue *q,
				       struct blk_mq_hw_ctx *hctx);
void blk_mq_debugfs_unregister_sched_hctx(struct blk_mq_hw_ctx *hctx);

bool debugfs_create_files(struct dentry *parent, void *data,
			  const struct blk_mq_debugfs_attr *attr);

static inline bool blk_mq_debugfs_enabled(struct request_queue *q)
{
	return !IS_ERR_OR_NULL(q->debugfs_dir);
}

#else
static inline int blk_mq_debugfs_register(struct request_queue *q)
{