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]
Message-ID: <CAPhsuW5DNs6Kp42VmBi5J4qB8_3orBHhdA82RJuzg7kmQO_2aA@mail.gmail.com>
Date:   Fri, 4 Mar 2022 11:14:57 -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 08/10] raid5-ppl: 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/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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ