bdi: use bdi_dev_name() to get device name
Use the common interface bdi_dev_name() to get device name. Signed-off-by: Yufen Yu <yuyufen@huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Add missing <linux/backing-dev.h> include BFQ Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
eb7ae5e06b
commit
d51cfc53ad
|
@ -123,6 +123,7 @@
|
||||||
#include <linux/ioprio.h>
|
#include <linux/ioprio.h>
|
||||||
#include <linux/sbitmap.h>
|
#include <linux/sbitmap.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
#include <linux/backing-dev.h>
|
||||||
|
|
||||||
#include "blk.h"
|
#include "blk.h"
|
||||||
#include "blk-mq.h"
|
#include "blk-mq.h"
|
||||||
|
@ -4976,8 +4977,9 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic)
|
||||||
ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio);
|
ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio);
|
||||||
switch (ioprio_class) {
|
switch (ioprio_class) {
|
||||||
default:
|
default:
|
||||||
dev_err(bfqq->bfqd->queue->backing_dev_info->dev,
|
pr_err("bdi %s: bfq: bad prio class %d\n",
|
||||||
"bfq: bad prio class %d\n", ioprio_class);
|
bdi_dev_name(bfqq->bfqd->queue->backing_dev_info),
|
||||||
|
ioprio_class);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case IOPRIO_CLASS_NONE:
|
case IOPRIO_CLASS_NONE:
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -496,7 +496,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg)
|
||||||
{
|
{
|
||||||
/* some drivers (floppy) instantiate a queue w/o disk registered */
|
/* some drivers (floppy) instantiate a queue w/o disk registered */
|
||||||
if (blkg->q->backing_dev_info->dev)
|
if (blkg->q->backing_dev_info->dev)
|
||||||
return dev_name(blkg->q->backing_dev_info->dev);
|
return bdi_dev_name(blkg->q->backing_dev_info);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ void ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
|
||||||
&congestion_kb_fops);
|
&congestion_kb_fops);
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "../../bdi/%s",
|
snprintf(name, sizeof(name), "../../bdi/%s",
|
||||||
dev_name(fsc->sb->s_bdi->dev));
|
bdi_dev_name(fsc->sb->s_bdi));
|
||||||
fsc->debugfs_bdi =
|
fsc->debugfs_bdi =
|
||||||
debugfs_create_symlink("bdi",
|
debugfs_create_symlink("bdi",
|
||||||
fsc->client->debugfs_dir,
|
fsc->client->debugfs_dir,
|
||||||
|
|
|
@ -33,7 +33,7 @@ TRACE_EVENT(wbt_stat,
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||||
ARRAY_SIZE(__entry->name));
|
ARRAY_SIZE(__entry->name));
|
||||||
__entry->rmean = stat[0].mean;
|
__entry->rmean = stat[0].mean;
|
||||||
__entry->rmin = stat[0].min;
|
__entry->rmin = stat[0].min;
|
||||||
|
@ -68,7 +68,7 @@ TRACE_EVENT(wbt_lat,
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||||
ARRAY_SIZE(__entry->name));
|
ARRAY_SIZE(__entry->name));
|
||||||
__entry->lat = div_u64(lat, 1000);
|
__entry->lat = div_u64(lat, 1000);
|
||||||
),
|
),
|
||||||
|
@ -105,7 +105,7 @@ TRACE_EVENT(wbt_step,
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||||
ARRAY_SIZE(__entry->name));
|
ARRAY_SIZE(__entry->name));
|
||||||
__entry->msg = msg;
|
__entry->msg = msg;
|
||||||
__entry->step = step;
|
__entry->step = step;
|
||||||
|
@ -141,7 +141,7 @@ TRACE_EVENT(wbt_timer,
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
strlcpy(__entry->name, dev_name(bdi->dev),
|
strlcpy(__entry->name, bdi_dev_name(bdi),
|
||||||
ARRAY_SIZE(__entry->name));
|
ARRAY_SIZE(__entry->name));
|
||||||
__entry->status = status;
|
__entry->status = status;
|
||||||
__entry->step = step;
|
__entry->step = step;
|
||||||
|
|
Loading…
Reference in New Issue