2022-03-04 19:22:23

by Christoph Hellwig

[permalink] [raw]
Subject: remove bio_devname

Hi Jens,

this series removes the bio_devname helper and just switches all users
to use the %pg format string directly.

Diffstat
block/bio.c | 6 ------
block/blk-core.c | 25 +++++++------------------
drivers/block/pktcdvd.c | 9 +--------
drivers/md/dm-crypt.c | 10 ++++------
drivers/md/dm-integrity.c | 5 ++---
drivers/md/md-multipath.c | 9 ++++-----
drivers/md/raid1.c | 5 ++---
drivers/md/raid5-ppl.c | 13 ++++---------
fs/ext4/page-io.c | 5 ++---
include/linux/bio.h | 2 --
10 files changed, 26 insertions(+), 63 deletions(-)


2022-03-04 19:29:49

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 06/10] md-multipath: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/md/md-multipath.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c
index c056a7d707b09..bc38a6133cda3 100644
--- a/drivers/md/md-multipath.c
+++ b/drivers/md/md-multipath.c
@@ -294,7 +294,6 @@ static void multipathd(struct md_thread *thread)

md_check_recovery(mddev);
for (;;) {
- char b[BDEVNAME_SIZE];
spin_lock_irqsave(&conf->device_lock, flags);
if (list_empty(head))
break;
@@ -306,13 +305,13 @@ static void multipathd(struct md_thread *thread)
bio->bi_iter.bi_sector = mp_bh->master_bio->bi_iter.bi_sector;

if ((mp_bh->path = multipath_map (conf))<0) {
- pr_err("multipath: %s: unrecoverable IO read error for block %llu\n",
- bio_devname(bio, b),
+ pr_err("multipath: %pg: unrecoverable IO read error for block %llu\n",
+ bio->bi_bdev,
(unsigned long long)bio->bi_iter.bi_sector);
multipath_end_bh_io(mp_bh, BLK_STS_IOERR);
} else {
- pr_err("multipath: %s: redirecting sector %llu to another IO path\n",
- bio_devname(bio, b),
+ pr_err("multipath: %pg: redirecting sector %llu to another IO path\n",
+ bio->bi_bdev,
(unsigned long long)bio->bi_iter.bi_sector);
*bio = *(mp_bh->master_bio);
bio->bi_iter.bi_sector +=
--
2.30.2

2022-03-04 19:48:14

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 08/10] raid5-ppl: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/md/raid5-ppl.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
index 93d9364a930e3..845db0ba7c17f 100644
--- a/drivers/md/raid5-ppl.c
+++ b/drivers/md/raid5-ppl.c
@@ -416,12 +416,10 @@ static void ppl_log_endio(struct bio *bio)

static void ppl_submit_iounit_bio(struct ppl_io_unit *io, struct bio *bio)
{
- char b[BDEVNAME_SIZE];
-
- pr_debug("%s: seq: %llu size: %u sector: %llu dev: %s\n",
+ pr_debug("%s: seq: %llu size: %u sector: %llu dev: %pg\n",
__func__, io->seq, bio->bi_iter.bi_size,
(unsigned long long)bio->bi_iter.bi_sector,
- bio_devname(bio, b));
+ bio->bi_bdev);

submit_bio(bio);
}
@@ -589,9 +587,8 @@ static void ppl_flush_endio(struct bio *bio)
struct ppl_log *log = io->log;
struct ppl_conf *ppl_conf = log->ppl_conf;
struct r5conf *conf = ppl_conf->mddev->private;
- char b[BDEVNAME_SIZE];

- pr_debug("%s: dev: %s\n", __func__, bio_devname(bio, b));
+ pr_debug("%s: dev: %pg\n", __func__, bio->bi_bdev);

if (bio->bi_status) {
struct md_rdev *rdev;
@@ -634,7 +631,6 @@ static void ppl_do_flush(struct ppl_io_unit *io)

if (bdev) {
struct bio *bio;
- char b[BDEVNAME_SIZE];

bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
REQ_OP_WRITE | REQ_PREFLUSH,
@@ -642,8 +638,7 @@ static void ppl_do_flush(struct ppl_io_unit *io)
bio->bi_private = io;
bio->bi_end_io = ppl_flush_endio;

- pr_debug("%s: dev: %s\n", __func__,
- bio_devname(bio, b));
+ pr_debug("%s: dev: %ps\n", __func__, bio->bi_bdev);

submit_bio(bio);
flushed_disks++;
--
2.30.2

2022-03-04 20:16:36

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 04/10] dm-crypt: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/md/dm-crypt.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a5006cb6ee8ad..e2b0af4a2ee84 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -1364,11 +1364,10 @@ static int crypt_convert_block_aead(struct crypt_config *cc,
}

if (r == -EBADMSG) {
- char b[BDEVNAME_SIZE];
sector_t s = le64_to_cpu(*sector);

- DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu",
- bio_devname(ctx->bio_in, b), s);
+ DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
+ ctx->bio_in->bi_bdev, s);
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
ctx->bio_in, s, 0);
}
@@ -2169,11 +2168,10 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq);

if (error == -EBADMSG) {
- char b[BDEVNAME_SIZE];
sector_t s = le64_to_cpu(*org_sector_of_dmreq(cc, dmreq));

- DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu",
- bio_devname(ctx->bio_in, b), s);
+ DMERR_LIMIT("%pg: INTEGRITY AEAD ERROR, sector %llu",
+ ctx->bio_in->bi_bdev, s);
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-aead",
ctx->bio_in, s, 0);
io->error = BLK_STS_PROTECTION;
--
2.30.2

2022-03-04 20:23:50

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 03/10] pktcdvd: remove a pointless debug check in pkt_submit_bio

->queuedata is set up in pkt_init_queue, so it can't be NULL here.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/block/pktcdvd.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 623df4141ff3f..a52bbedd2f33d 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2400,18 +2400,11 @@ static void pkt_make_request_write(struct request_queue *q, struct bio *bio)

static void pkt_submit_bio(struct bio *bio)
{
- struct pktcdvd_device *pd;
- char b[BDEVNAME_SIZE];
+ struct pktcdvd_device *pd = bio->bi_bdev->bd_disk->queue->queuedata;
struct bio *split;

blk_queue_split(&bio);

- pd = bio->bi_bdev->bd_disk->queue->queuedata;
- if (!pd) {
- pr_err("%s incorrect request queue\n", bio_devname(bio, b));
- goto end_io;
- }
-
pkt_dbg(2, pd, "start = %6llx stop = %6llx\n",
(unsigned long long)bio->bi_iter.bi_sector,
(unsigned long long)bio_end_sector(bio));
--
2.30.2

2022-03-04 20:24:02

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 10/10] block: remove bio_devname

All callers are gone, so remove this wrapper.

Signed-off-by: Christoph Hellwig <[email protected]>
---
block/bio.c | 6 ------
include/linux/bio.h | 2 --
2 files changed, 8 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index b15f5466ce084..151cace2dbe16 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -807,12 +807,6 @@ int bio_init_clone(struct block_device *bdev, struct bio *bio,
}
EXPORT_SYMBOL(bio_init_clone);

-const char *bio_devname(struct bio *bio, char *buf)
-{
- return bdevname(bio->bi_bdev, buf);
-}
-EXPORT_SYMBOL(bio_devname);
-
/**
* bio_full - check if the bio is full
* @bio: bio to check
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 7523aba4ddf7c..4c21f6e69e182 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -491,8 +491,6 @@ static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
__bio_release_pages(bio, mark_dirty);
}

-extern const char *bio_devname(struct bio *bio, char *buffer);
-
#define bio_dev(bio) \
disk_devt((bio)->bi_bdev->bd_disk)

--
2.30.2

2022-03-04 20:32:06

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 07/10] raid1: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/md/raid1.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index c180c188da574..97574575ad0b4 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2069,15 +2069,14 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
} while (!success && d != r1_bio->read_disk);

if (!success) {
- char b[BDEVNAME_SIZE];
int abort = 0;
/* Cannot read from anywhere, this block is lost.
* Record a bad block on each device. If that doesn't
* work just disable and interrupt the recovery.
* Don't fail devices as that won't really help.
*/
- pr_crit_ratelimited("md/raid1:%s: %s: unrecoverable I/O read error for block %llu\n",
- mdname(mddev), bio_devname(bio, b),
+ pr_crit_ratelimited("md/raid1:%s: %pg: unrecoverable I/O read error for block %llu\n",
+ mdname(mddev), bio->bi_bdev,
(unsigned long long)r1_bio->sector);
for (d = 0; d < conf->raid_disks * 2; d++) {
rdev = conf->mirrors[d].rdev;
--
2.30.2

2022-03-04 20:32:36

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 05/10] dm-integrity: stop using bio_devname

Use the %pg format specifier to save on stack consuption and code size.

Signed-off-by: Christoph Hellwig <[email protected]>
---
drivers/md/dm-integrity.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index eb4b5e52bd6ff..c58a5111cb575 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -1788,12 +1788,11 @@ static void integrity_metadata(struct work_struct *w)
checksums_ptr - checksums, dio->op == REQ_OP_READ ? TAG_CMP : TAG_WRITE);
if (unlikely(r)) {
if (r > 0) {
- char b[BDEVNAME_SIZE];
sector_t s;

s = sector - ((r + ic->tag_size - 1) / ic->tag_size);
- DMERR_LIMIT("%s: Checksum failed at sector 0x%llx",
- bio_devname(bio, b), s);
+ DMERR_LIMIT("%pg: Checksum failed at sector 0x%llx",
+ bio->bi_bdev, s);
r = -EILSEQ;
atomic64_inc(&ic->number_of_mismatches);
dm_audit_log_bio(DM_MSG_PREFIX, "integrity-checksum",
--
2.30.2

2022-03-04 20:35:20

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 01/10] block: fix and cleanup bio_check_ro

Don't use a WARN_ON when printing a potentially user triggered
condition. Also don't print the partno when the block device name
already includes it, and use the %pg specifier to simplify printing
the block device name.

Signed-off-by: Christoph Hellwig <[email protected]>
---
block/blk-core.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 94bf37f8e61d2..34e1b7fdb7c89 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -580,14 +580,10 @@ late_initcall(fail_make_request_debugfs);
static inline bool bio_check_ro(struct bio *bio)
{
if (op_is_write(bio_op(bio)) && bdev_read_only(bio->bi_bdev)) {
- char b[BDEVNAME_SIZE];
-
if (op_is_flush(bio->bi_opf) && !bio_sectors(bio))
return false;
-
- WARN_ONCE(1,
- "Trying to write to read-only block-device %s (partno %d)\n",
- bio_devname(bio, b), bio->bi_bdev->bd_partno);
+ pr_warn("Trying to write to read-only block-device %pg\n",
+ bio->bi_bdev);
/* Older lvm-tools actually trigger this */
return false;
}
--
2.30.2

2022-03-04 20:48:01

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 02/10] block: remove handle_bad_sector

Use the %pg format specifier instead of the stack hungry bdevname
function, and remove handle_bad_sector given that it is not pointless.

Signed-off-by: Christoph Hellwig <[email protected]>
---
block/blk-core.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 34e1b7fdb7c89..4d858fc08f8ba 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -540,17 +540,6 @@ bool blk_get_queue(struct request_queue *q)
}
EXPORT_SYMBOL(blk_get_queue);

-static void handle_bad_sector(struct bio *bio, sector_t maxsector)
-{
- char b[BDEVNAME_SIZE];
-
- pr_info_ratelimited("%s: attempt to access beyond end of device\n"
- "%s: rw=%d, want=%llu, limit=%llu\n",
- current->comm,
- bio_devname(bio, b), bio->bi_opf,
- bio_end_sector(bio), maxsector);
-}
-
#ifdef CONFIG_FAIL_MAKE_REQUEST

static DECLARE_FAULT_ATTR(fail_make_request);
@@ -612,7 +601,11 @@ static inline int bio_check_eod(struct bio *bio)
if (nr_sectors && maxsector &&
(nr_sectors > maxsector ||
bio->bi_iter.bi_sector > maxsector - nr_sectors)) {
- handle_bad_sector(bio, maxsector);
+ pr_info_ratelimited("%s: attempt to access beyond end of device\n"
+ "%pg: rw=%d, want=%llu, limit=%llu\n",
+ current->comm,
+ bio->bi_bdev, bio->bi_opf,
+ bio_end_sector(bio), maxsector);
return -EIO;
}
return 0;
--
2.30.2

2022-03-04 20:48:35

by Song Liu

[permalink] [raw]
Subject: Re: [PATCH 08/10] raid5-ppl: stop using bio_devname

On Fri, Mar 4, 2022 at 10:01 AM Christoph Hellwig <[email protected]> wrote:
>
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>

Acked-by: Song Liu <[email protected]>

> ---
> drivers/md/raid5-ppl.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/md/raid5-ppl.c b/drivers/md/raid5-ppl.c
> index 93d9364a930e3..845db0ba7c17f 100644
> --- a/drivers/md/raid5-ppl.c
> +++ b/drivers/md/raid5-ppl.c
> @@ -416,12 +416,10 @@ static void ppl_log_endio(struct bio *bio)
>
> static void ppl_submit_iounit_bio(struct ppl_io_unit *io, struct bio *bio)
> {
> - char b[BDEVNAME_SIZE];
> -
> - pr_debug("%s: seq: %llu size: %u sector: %llu dev: %s\n",
> + pr_debug("%s: seq: %llu size: %u sector: %llu dev: %pg\n",
> __func__, io->seq, bio->bi_iter.bi_size,
> (unsigned long long)bio->bi_iter.bi_sector,
> - bio_devname(bio, b));
> + bio->bi_bdev);
>
> submit_bio(bio);
> }
> @@ -589,9 +587,8 @@ static void ppl_flush_endio(struct bio *bio)
> struct ppl_log *log = io->log;
> struct ppl_conf *ppl_conf = log->ppl_conf;
> struct r5conf *conf = ppl_conf->mddev->private;
> - char b[BDEVNAME_SIZE];
>
> - pr_debug("%s: dev: %s\n", __func__, bio_devname(bio, b));
> + pr_debug("%s: dev: %pg\n", __func__, bio->bi_bdev);
>
> if (bio->bi_status) {
> struct md_rdev *rdev;
> @@ -634,7 +631,6 @@ static void ppl_do_flush(struct ppl_io_unit *io)
>
> if (bdev) {
> struct bio *bio;
> - char b[BDEVNAME_SIZE];
>
> bio = bio_alloc_bioset(bdev, 0, GFP_NOIO,
> REQ_OP_WRITE | REQ_PREFLUSH,
> @@ -642,8 +638,7 @@ static void ppl_do_flush(struct ppl_io_unit *io)
> bio->bi_private = io;
> bio->bi_end_io = ppl_flush_endio;
>
> - pr_debug("%s: dev: %s\n", __func__,
> - bio_devname(bio, b));
> + pr_debug("%s: dev: %ps\n", __func__, bio->bi_bdev);
>
> submit_bio(bio);
> flushed_disks++;
> --
> 2.30.2
>

2022-03-04 20:48:39

by Song Liu

[permalink] [raw]
Subject: Re: [PATCH 06/10] md-multipath: stop using bio_devname

On Fri, Mar 4, 2022 at 10:01 AM Christoph Hellwig <[email protected]> wrote:
>
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>

Acked-by: Song Liu <[email protected]>

> ---
> drivers/md/md-multipath.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/md/md-multipath.c b/drivers/md/md-multipath.c
> index c056a7d707b09..bc38a6133cda3 100644
> --- a/drivers/md/md-multipath.c
> +++ b/drivers/md/md-multipath.c
> @@ -294,7 +294,6 @@ static void multipathd(struct md_thread *thread)
>
> md_check_recovery(mddev);
> for (;;) {
> - char b[BDEVNAME_SIZE];
> spin_lock_irqsave(&conf->device_lock, flags);
> if (list_empty(head))
> break;
> @@ -306,13 +305,13 @@ static void multipathd(struct md_thread *thread)
> bio->bi_iter.bi_sector = mp_bh->master_bio->bi_iter.bi_sector;
>
> if ((mp_bh->path = multipath_map (conf))<0) {
> - pr_err("multipath: %s: unrecoverable IO read error for block %llu\n",
> - bio_devname(bio, b),
> + pr_err("multipath: %pg: unrecoverable IO read error for block %llu\n",
> + bio->bi_bdev,
> (unsigned long long)bio->bi_iter.bi_sector);
> multipath_end_bh_io(mp_bh, BLK_STS_IOERR);
> } else {
> - pr_err("multipath: %s: redirecting sector %llu to another IO path\n",
> - bio_devname(bio, b),
> + pr_err("multipath: %pg: redirecting sector %llu to another IO path\n",
> + bio->bi_bdev,
> (unsigned long long)bio->bi_iter.bi_sector);
> *bio = *(mp_bh->master_bio);
> bio->bi_iter.bi_sector +=
> --
> 2.30.2
>

2022-03-04 20:55:42

by Song Liu

[permalink] [raw]
Subject: Re: [PATCH 07/10] raid1: stop using bio_devname

On Fri, Mar 4, 2022 at 10:01 AM Christoph Hellwig <[email protected]> wrote:
>
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>

Acked-by: Song Liu <[email protected]>

> ---
> drivers/md/raid1.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index c180c188da574..97574575ad0b4 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -2069,15 +2069,14 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
> } while (!success && d != r1_bio->read_disk);
>
> if (!success) {
> - char b[BDEVNAME_SIZE];
> int abort = 0;
> /* Cannot read from anywhere, this block is lost.
> * Record a bad block on each device. If that doesn't
> * work just disable and interrupt the recovery.
> * Don't fail devices as that won't really help.
> */
> - pr_crit_ratelimited("md/raid1:%s: %s: unrecoverable I/O read error for block %llu\n",
> - mdname(mddev), bio_devname(bio, b),
> + pr_crit_ratelimited("md/raid1:%s: %pg: unrecoverable I/O read error for block %llu\n",
> + mdname(mddev), bio->bi_bdev,
> (unsigned long long)r1_bio->sector);
> for (d = 0; d < conf->raid_disks * 2; d++) {
> rdev = conf->mirrors[d].rdev;
> --
> 2.30.2
>

2022-03-07 03:44:55

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 02/10] block: remove handle_bad_sector

On 3/4/22 10:00, Christoph Hellwig wrote:
> Use the %pg format specifier instead of the stack hungry bdevname
> function, and remove handle_bad_sector given that it is not pointless.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 06:46:12

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 01/10] block: fix and cleanup bio_check_ro

On 3/4/22 10:00, Christoph Hellwig wrote:
> Don't use a WARN_ON when printing a potentially user triggered
> condition. Also don't print the partno when the block device name
> already includes it, and use the %pg specifier to simplify printing
> the block device name.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 07:37:40

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 04/10] dm-crypt: stop using bio_devname

On 3/4/22 10:00, Christoph Hellwig wrote:
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 08:13:28

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 10/10] block: remove bio_devname

On 3/4/22 10:01, Christoph Hellwig wrote:
> All callers are gone, so remove this wrapper.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 08:13:29

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 05/10] dm-integrity: stop using bio_devname

On 3/4/22 10:01, Christoph Hellwig wrote:
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 09:33:27

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 06/10] md-multipath: stop using bio_devname

On 3/4/22 10:01, Christoph Hellwig wrote:
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 09:42:49

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 07/10] raid1: stop using bio_devname

On 3/4/22 10:01, Christoph Hellwig wrote:
> Use the %pg format specifier to save on stack consuption and code size.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---


Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>


2022-03-07 20:41:31

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: remove bio_devname

On 04/03/2022 19:01, Christoph Hellwig wrote:
> Hi Jens,
>
> this series removes the bio_devname helper and just switches all users
> to use the %pg format string directly.
>
> Diffstat
> block/bio.c | 6 ------
> block/blk-core.c | 25 +++++++------------------
> drivers/block/pktcdvd.c | 9 +--------
> drivers/md/dm-crypt.c | 10 ++++------
> drivers/md/dm-integrity.c | 5 ++---
> drivers/md/md-multipath.c | 9 ++++-----
> drivers/md/raid1.c | 5 ++---
> drivers/md/raid5-ppl.c | 13 ++++---------
> fs/ext4/page-io.c | 5 ++---
> include/linux/bio.h | 2 --
> 10 files changed, 26 insertions(+), 63 deletions(-)
>

Looks good,
Reviewed-by: Johannes Thumshirn <[email protected]>

2022-03-08 11:58:00

by Mike Snitzer

[permalink] [raw]
Subject: Re: remove bio_devname

On Mon, Mar 07 2022 at 11:48P -0500,
Christoph Hellwig <[email protected]> wrote:

> On Mon, Mar 07, 2022 at 11:45:53AM -0500, Mike Snitzer wrote:
> > Should those go through block too? Or is there no plan to remove
> > bdevname()?
>
> My preference would be: do the full bio_devname removal through Jens'
> tree and you keep the bvdevname removal. I hope bdevname will go away
> as well, but certainly not in this merge window.

OK, sounds good. Thanks

2022-03-08 13:05:50

by Christoph Hellwig

[permalink] [raw]
Subject: Re: remove bio_devname

On Mon, Mar 07, 2022 at 11:45:53AM -0500, Mike Snitzer wrote:
> Should those go through block too? Or is there no plan to remove
> bdevname()?

My preference would be: do the full bio_devname removal through Jens'
tree and you keep the bvdevname removal. I hope bdevname will go away
as well, but certainly not in this merge window.

2022-03-08 17:28:59

by Jens Axboe

[permalink] [raw]
Subject: Re: remove bio_devname

On Fri, 4 Mar 2022 19:00:55 +0100, Christoph Hellwig wrote:
> this series removes the bio_devname helper and just switches all users
> to use the %pg format string directly.
>
> Diffstat
> block/bio.c | 6 ------
> block/blk-core.c | 25 +++++++------------------
> drivers/block/pktcdvd.c | 9 +--------
> drivers/md/dm-crypt.c | 10 ++++------
> drivers/md/dm-integrity.c | 5 ++---
> drivers/md/md-multipath.c | 9 ++++-----
> drivers/md/raid1.c | 5 ++---
> drivers/md/raid5-ppl.c | 13 ++++---------
> fs/ext4/page-io.c | 5 ++---
> include/linux/bio.h | 2 --
> 10 files changed, 26 insertions(+), 63 deletions(-)
>
> [...]

Applied, thanks!

[01/10] block: fix and cleanup bio_check_ro
commit: 57e95e4670d1126c103305bcf34a9442f49f6d6a
[02/10] block: remove handle_bad_sector
commit: ad740780bbc2fe37856f944dbbaff07aac9db9e3
[03/10] pktcdvd: remove a pointless debug check in pkt_submit_bio
commit: 47c426d5241795cfcd9be748c44d1b2e2987ce70
[04/10] dm-crypt: stop using bio_devname
commit: 66671719650085f92fd460d2a356c33f9198dd35
[05/10] dm-integrity: stop using bio_devname
commit: 0a806cfde82fcd1fb856864e33d17c68d1b51dee
[06/10] md-multipath: stop using bio_devname
commit: ee1925bd834418218c782c94e889f826d40b14d5
[07/10] raid1: stop using bio_devname
commit: ac483eb375fa4a815a515945a5456086c197430e
[08/10] raid5-ppl: stop using bio_devname
commit: c7dec4623c9cde20dad8de319d177ed6aa382aaa
[09/10] ext4: stop using bio_devname
commit: 734294e47a2ec48fd25dcf2d96cdf2c6c6740c00
[10/10] block: remove bio_devname
commit: 97939610b893de068c82c347d06319cd231a4602

Best regards,
--
Jens Axboe


2022-03-08 23:56:25

by Mike Snitzer

[permalink] [raw]
Subject: Re: remove bio_devname

On Mon, Mar 07 2022 at 8:42P -0500,
Jens Axboe <[email protected]> wrote:

> On Fri, 4 Mar 2022 19:00:55 +0100, Christoph Hellwig wrote:
> > this series removes the bio_devname helper and just switches all users
> > to use the %pg format string directly.
> >
> > Diffstat
> > block/bio.c | 6 ------
> > block/blk-core.c | 25 +++++++------------------
> > drivers/block/pktcdvd.c | 9 +--------
> > drivers/md/dm-crypt.c | 10 ++++------
> > drivers/md/dm-integrity.c | 5 ++---
> > drivers/md/md-multipath.c | 9 ++++-----
> > drivers/md/raid1.c | 5 ++---
> > drivers/md/raid5-ppl.c | 13 ++++---------
> > fs/ext4/page-io.c | 5 ++---
> > include/linux/bio.h | 2 --
> > 10 files changed, 26 insertions(+), 63 deletions(-)
> >
> > [...]
>
> Applied, thanks!
>
> [01/10] block: fix and cleanup bio_check_ro
> commit: 57e95e4670d1126c103305bcf34a9442f49f6d6a
> [02/10] block: remove handle_bad_sector
> commit: ad740780bbc2fe37856f944dbbaff07aac9db9e3
> [03/10] pktcdvd: remove a pointless debug check in pkt_submit_bio
> commit: 47c426d5241795cfcd9be748c44d1b2e2987ce70


> [04/10] dm-crypt: stop using bio_devname
> commit: 66671719650085f92fd460d2a356c33f9198dd35
> [05/10] dm-integrity: stop using bio_devname
> commit: 0a806cfde82fcd1fb856864e33d17c68d1b51dee
> [06/10] md-multipath: stop using bio_devname

I had already picked these 2 up.. but happy to drop them.

> commit: ee1925bd834418218c782c94e889f826d40b14d5
> [07/10] raid1: stop using bio_devname
> commit: ac483eb375fa4a815a515945a5456086c197430e
> [08/10] raid5-ppl: stop using bio_devname
> commit: c7dec4623c9cde20dad8de319d177ed6aa382aaa
> [09/10] ext4: stop using bio_devname
> commit: 734294e47a2ec48fd25dcf2d96cdf2c6c6740c00
> [10/10] block: remove bio_devname
> commit: 97939610b893de068c82c347d06319cd231a4602

I also picked up 2 previous patches from hch too:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-5.18&id=977ff73e64151d94811f4ba905419c90573f63e1
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-5.18&id=385411ffba0c3305491346b98ba4d2cd8063f002

Should those go through block too? Or is there no plan to remove
bdevname()?

Thanks,
Mike