From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
axboe@kernel.dk, viro@zeniv.linux.org.uk, dm-devel@redhat.com
Subject: Re: [PATCH 1/7] fs: use gendisk->disk_name where possible
Date: Tue, 14 Apr 2015 11:13:14 +0200 [thread overview]
Message-ID: <20150414091314.GD23327@quack.suse.cz> (raw)
In-Reply-To: <1428928300-9132-2-git-send-email-dmonakhov@openvz.org>
On Mon 13-04-15 16:31:34, Dmitry Monakhov wrote:
> gendisk with part==0 is obviously gendisk->disk_name.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/block_dev.c | 12 +++---------
> 1 files changed, 3 insertions(+), 9 deletions(-)
>
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 79b4fa3..f123b02 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -1011,12 +1011,9 @@ EXPORT_SYMBOL_GPL(bd_unlink_disk_holder);
> static void flush_disk(struct block_device *bdev, bool kill_dirty)
> {
> if (__invalidate_device(bdev, kill_dirty)) {
> - char name[BDEVNAME_SIZE] = "";
> -
> - if (bdev->bd_disk)
> - disk_name(bdev->bd_disk, 0, name);
> printk(KERN_WARNING "VFS: busy inodes on changed media or "
> - "resized disk %s\n", name);
> + "resized disk %s\n",
> + bdev->bd_disk ? bdev->bd_disk->disk_name : "");
> }
>
> if (!bdev->bd_disk)
> @@ -1040,12 +1037,9 @@ void check_disk_size_change(struct gendisk *disk, struct block_device *bdev)
> disk_size = (loff_t)get_capacity(disk) << 9;
> bdev_size = i_size_read(bdev->bd_inode);
> if (disk_size != bdev_size) {
> - char name[BDEVNAME_SIZE];
> -
> - disk_name(disk, 0, name);
> printk(KERN_INFO
> "%s: detected capacity change from %lld to %lld\n",
> - name, bdev_size, disk_size);
> + disk->disk_name, bdev_size, disk_size);
> i_size_write(bdev->bd_inode, disk_size);
> flush_disk(bdev, false);
> }
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2015-04-14 9:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 12:31 [PATCH 0/7] fs: add blkdev name format specifier v2 Dmitry Monakhov
2015-04-13 12:31 ` [PATCH 1/7] fs: use gendisk->disk_name where possible Dmitry Monakhov
2015-04-14 9:13 ` Jan Kara [this message]
2015-04-13 12:31 ` [PATCH 2/7] lib/vsprintf: add %*pg format specifier Dmitry Monakhov
2015-04-14 9:15 ` Jan Kara
2015-04-13 12:31 ` [PATCH 3/7] block: use block_device name vsprintf helper Dmitry Monakhov
2015-04-14 9:16 ` Jan Kara
2015-04-13 12:31 ` [PATCH 4/7] fs: " Dmitry Monakhov
2015-04-14 9:22 ` Jan Kara
2015-04-13 12:31 ` [PATCH 5/7] md: " Dmitry Monakhov
2015-04-14 9:43 ` Jan Kara
2015-04-13 12:31 ` [PATCH 6/7] block/partitions: use block_device name vsprintf helper v2 Dmitry Monakhov
2015-04-14 9:23 ` Jan Kara
2015-04-13 12:31 ` [PATCH 7/7] drivers: use block_device name vsprintf helper Dmitry Monakhov
2015-04-14 9:24 ` Jan Kara
2015-04-17 8:29 [PATCH 0/7] fs: add blkdev name format specifier v2 Dmitry Monakhov
2015-04-17 8:29 ` [PATCH 1/7] fs: use gendisk->disk_name where possible Dmitry Monakhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150414091314.GD23327@quack.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).