diff options
author | Christoph Hellwig <hch@lst.de> | 2022-03-01 11:38:15 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2022-03-02 20:15:54 +0300 |
commit | 385411ffba0c3305491346b98ba4d2cd8063f002 (patch) | |
tree | 7a1d403b97060ac2e05a36981b8881cab6b2e42d /drivers/md/dm-thin.c | |
parent | 977ff73e64151d94811f4ba905419c90573f63e1 (diff) | |
download | linux-385411ffba0c3305491346b98ba4d2cd8063f002.tar.xz |
dm: stop using bdevname
Just use the %pg format specifier instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 2c13731a3b44..a01aa4ef2042 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -2824,7 +2824,6 @@ static void disable_passdown_if_not_supported(struct pool_c *pt) struct block_device *data_bdev = pt->data_dev->bdev; struct queue_limits *data_limits = &bdev_get_queue(data_bdev)->limits; const char *reason = NULL; - char buf[BDEVNAME_SIZE]; if (!pt->adjusted_pf.discard_passdown) return; @@ -2836,7 +2835,7 @@ static void disable_passdown_if_not_supported(struct pool_c *pt) reason = "max discard sectors smaller than a block"; if (reason) { - DMWARN("Data device (%s) %s: Disabling discard passdown.", bdevname(data_bdev, buf), reason); + DMWARN("Data device (%pg) %s: Disabling discard passdown.", data_bdev, reason); pt->adjusted_pf.discard_passdown = false; } } @@ -3201,11 +3200,10 @@ static sector_t get_dev_size(struct block_device *bdev) static void warn_if_metadata_device_too_big(struct block_device *bdev) { sector_t metadata_dev_size = get_dev_size(bdev); - char buffer[BDEVNAME_SIZE]; if (metadata_dev_size > THIN_METADATA_MAX_SECTORS_WARNING) - DMWARN("Metadata device %s is larger than %u sectors: excess space will not be used.", - bdevname(bdev, buffer), THIN_METADATA_MAX_SECTORS); + DMWARN("Metadata device %pg is larger than %u sectors: excess space will not be used.", + bdev, THIN_METADATA_MAX_SECTORS); } static sector_t get_metadata_dev_size(struct block_device *bdev) |