Re: [PATCH 8/8] bdi: remove the name field in struct backing_dev_info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 16-04-20 09:15:19, Christoph Hellwig wrote:
> The name is only printed for a not registered bdi in writeback.  Use the
> device name there as is more useful anyway for the unlike case that the
> warning triggers.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Ah, cool. So it isn't used in sysfs/debugfs as I was afraid. The patch
looks good to me. You can add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza

> ---
>  block/blk-core.c                 | 1 -
>  drivers/mtd/mtdcore.c            | 1 -
>  fs/fs-writeback.c                | 2 +-
>  fs/super.c                       | 2 --
>  include/linux/backing-dev-defs.h | 2 --
>  mm/backing-dev.c                 | 1 -
>  6 files changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index ab87f2833ab2..f37068c611bf 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -494,7 +494,6 @@ struct request_queue *__blk_alloc_queue(int node_id)
>  
>  	q->backing_dev_info->ra_pages = VM_READAHEAD_PAGES;
>  	q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK;
> -	q->backing_dev_info->name = "block";
>  	q->node = node_id;
>  
>  	timer_setup(&q->backing_dev_info->laptop_mode_wb_timer,
> diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
> index 39ec563d9a14..fcb018ce17c3 100644
> --- a/drivers/mtd/mtdcore.c
> +++ b/drivers/mtd/mtdcore.c
> @@ -2040,7 +2040,6 @@ static struct backing_dev_info * __init mtd_bdi_init(char *name)
>  	if (!bdi)
>  		return ERR_PTR(-ENOMEM);
>  
> -	bdi->name = name;
>  	/*
>  	 * We put '-0' suffix to the name to get the same name format as we
>  	 * used to get. Since this is called only once, we get a unique name. 
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index 76ac9c7d32ec..d85323607b49 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -2320,7 +2320,7 @@ void __mark_inode_dirty(struct inode *inode, int flags)
>  
>  			WARN(bdi_cap_writeback_dirty(wb->bdi) &&
>  			     !test_bit(WB_registered, &wb->state),
> -			     "bdi-%s not registered\n", wb->bdi->name);
> +			     "bdi-%s not registered\n", bdi_dev_name(wb->bdi));
>  
>  			inode->dirtied_when = jiffies;
>  			if (dirtytime)
> diff --git a/fs/super.c b/fs/super.c
> index dd28fcd706ff..4991f441988e 100644
> --- a/fs/super.c
> +++ b/fs/super.c
> @@ -1602,8 +1602,6 @@ int super_setup_bdi_name(struct super_block *sb, char *fmt, ...)
>  	if (!bdi)
>  		return -ENOMEM;
>  
> -	bdi->name = sb->s_type->name;
> -
>  	va_start(args, fmt);
>  	err = bdi_register_va(bdi, fmt, args);
>  	va_end(args);
> diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
> index 249590bcccf7..0a55170b2142 100644
> --- a/include/linux/backing-dev-defs.h
> +++ b/include/linux/backing-dev-defs.h
> @@ -194,8 +194,6 @@ struct backing_dev_info {
>  	congested_fn *congested_fn; /* Function pointer if device is md/dm */
>  	void *congested_data;	/* Pointer to aux data for congested func */
>  
> -	const char *name;
> -
>  	struct kref refcnt;	/* Reference counter for the structure */
>  	unsigned int capabilities; /* Device capabilities */
>  	unsigned int min_ratio;
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index 119a41650833..dc7215dfd56b 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -15,7 +15,6 @@
>  #include <trace/events/writeback.h>
>  
>  struct backing_dev_info noop_backing_dev_info = {
> -	.name		= "noop",
>  	.capabilities	= BDI_CAP_NO_ACCT_AND_WRITEBACK,
>  };
>  EXPORT_SYMBOL_GPL(noop_backing_dev_info);
> -- 
> 2.25.1
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux