lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200422090746.GD8775@quack2.suse.cz>
Date:   Wed, 22 Apr 2020 11:07:46 +0200
From:   Jan Kara <jack@...e.cz>
To:     Christoph Hellwig <hch@....de>
Cc:     axboe@...nel.dk, yuyufen@...wei.com, tj@...nel.org, jack@...e.cz,
        bvanassche@....org, tytso@....edu, hdegoede@...hat.com,
        gregkh@...uxfoundation.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/9] bdi: use bdi_dev_name() to get device name

On Wed 22-04-20 09:38:45, Christoph Hellwig wrote:
> From: Yufen Yu <yuyufen@...wei.com>
> 
> Use the common interface bdi_dev_name() to get device name.
> 
> Signed-off-by: Yufen Yu <yuyufen@...wei.com>
> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Christoph Hellwig <hch@....de>

Looks good to me. You can add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  block/bfq-iosched.c        | 5 +++--
>  block/blk-cgroup.c         | 2 +-
>  fs/ceph/debugfs.c          | 2 +-
>  include/trace/events/wbt.h | 8 ++++----
>  4 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
> index 78ba57efd16b..4d4fe44a9eea 100644
> --- a/block/bfq-iosched.c
> +++ b/block/bfq-iosched.c
> @@ -4976,8 +4976,9 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic)
>  	ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio);
>  	switch (ioprio_class) {
>  	default:
> -		dev_err(bfqq->bfqd->queue->backing_dev_info->dev,
> -			"bfq: bad prio class %d\n", ioprio_class);
> +		pr_err("bdi %s: bfq: bad prio class %d\n",
> +				bdi_dev_name(bfqq->bfqd->queue->backing_dev_info),
> +				ioprio_class);
>  		/* fall through */
>  	case IOPRIO_CLASS_NONE:
>  		/*
> diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
> index c5dc833212e1..930212c1a512 100644
> --- a/block/blk-cgroup.c
> +++ b/block/blk-cgroup.c
> @@ -496,7 +496,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg)
>  {
>  	/* some drivers (floppy) instantiate a queue w/o disk registered */
>  	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;
>  }
>  
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index 481ac97b4d25..dcaed75de9e6 100644
> --- a/fs/ceph/debugfs.c
> +++ b/fs/ceph/debugfs.c
> @@ -271,7 +271,7 @@ void ceph_fs_debugfs_init(struct ceph_fs_client *fsc)
>  				    &congestion_kb_fops);
>  
>  	snprintf(name, sizeof(name), "../../bdi/%s",
> -		 dev_name(fsc->sb->s_bdi->dev));
> +		 bdi_dev_name(fsc->sb->s_bdi));
>  	fsc->debugfs_bdi =
>  		debugfs_create_symlink("bdi",
>  				       fsc->client->debugfs_dir,
> diff --git a/include/trace/events/wbt.h b/include/trace/events/wbt.h
> index 784814160197..9c66e59d859c 100644
> --- a/include/trace/events/wbt.h
> +++ b/include/trace/events/wbt.h
> @@ -33,7 +33,7 @@ TRACE_EVENT(wbt_stat,
>  	),
>  
>  	TP_fast_assign(
> -		strlcpy(__entry->name, dev_name(bdi->dev),
> +		strlcpy(__entry->name, bdi_dev_name(bdi),
>  			ARRAY_SIZE(__entry->name));
>  		__entry->rmean		= stat[0].mean;
>  		__entry->rmin		= stat[0].min;
> @@ -68,7 +68,7 @@ TRACE_EVENT(wbt_lat,
>  	),
>  
>  	TP_fast_assign(
> -		strlcpy(__entry->name, dev_name(bdi->dev),
> +		strlcpy(__entry->name, bdi_dev_name(bdi),
>  			ARRAY_SIZE(__entry->name));
>  		__entry->lat = div_u64(lat, 1000);
>  	),
> @@ -105,7 +105,7 @@ TRACE_EVENT(wbt_step,
>  	),
>  
>  	TP_fast_assign(
> -		strlcpy(__entry->name, dev_name(bdi->dev),
> +		strlcpy(__entry->name, bdi_dev_name(bdi),
>  			ARRAY_SIZE(__entry->name));
>  		__entry->msg	= msg;
>  		__entry->step	= step;
> @@ -141,7 +141,7 @@ TRACE_EVENT(wbt_timer,
>  	),
>  
>  	TP_fast_assign(
> -		strlcpy(__entry->name, dev_name(bdi->dev),
> +		strlcpy(__entry->name, bdi_dev_name(bdi),
>  			ARRAY_SIZE(__entry->name));
>  		__entry->status		= status;
>  		__entry->step		= step;
> -- 
> 2.26.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ