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]
Date:   Fri, 4 Mar 2022 11:14:28 -0800
From:   Song Liu <song@...nel.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Jens Axboe <axboe@...nel.dk>, "Theodore Ts'o" <tytso@....edu>,
        linux-block@...r.kernel.org, dm-devel@...hat.com,
        linux-raid <linux-raid@...r.kernel.org>,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH 06/10] md-multipath: stop using bio_devname

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

Acked-by: Song Liu <song@...nel.org>

> ---
>  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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ