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] [day] [month] [year] [list]
Message-ID: <CA+res+SmjdYYsvJO5t4BQ6ZXxdJibDbV_gU0Q_fNb0jzw+H3-Q@mail.gmail.com>
Date:   Wed, 26 Jan 2022 22:22:36 +0100
From:   Jack Wang <jack.wang.usish@...il.com>
To:     Guillaume Morin <guillaume@...infr.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org, stable <stable@...r.kernel.org>,
        Guoqing Jiang <jiangguoqing@...inos.cn>,
        Song Liu <song@...nel.org>
Subject: Re: [PATCH 5.10 01/25] md: revert io stats accounting

Guillaume Morin <guillaume@...infr.org> 于2022年1月26日周三 16:12写道:
>
> On 26 Jan 11:09, Jack Wang wrote:
> > >
> > > -       if (bio->bi_end_io != md_end_io) {
> > > -               struct md_io *md_io;
> > > -
> > > -               md_io = mempool_alloc(&mddev->md_io_pool, GFP_NOIO);
> > > -               md_io->mddev = mddev;
> > > -               md_io->orig_bi_end_io = bio->bi_end_io;
> > > -               md_io->orig_bi_private = bio->bi_private;
> > > -
> > > -               bio->bi_end_io = md_end_io;
> > > -               bio->bi_private = md_io;
> > > -
> > > -               md_io->start_time = part_start_io_acct(mddev->gendisk,
> > > -                                                      &md_io->part, bio);
> > > -       }
> > > -
> > > +       /*
> > > +        * save the sectors now since our bio can
> > > +        * go away inside make_request
> > > +        */
> > > +       sectors = bio_sectors(bio);
> > This code snip is not inside the original patch, and it's not in
> > latest upstream too.
> > >         /* bio could be mergeable after passing to underlayer */
> > >         bio->bi_opf &= ~REQ_NOMERGE;
> > >
> > >         md_handle_request(mddev, bio);
> > >
> > > +       part_stat_lock();
> > > +       part_stat_inc(&mddev->gendisk->part0, ios[sgrp]);
> > > +       part_stat_add(&mddev->gendisk->part0, sectors[sgrp], sectors);
> > > +       part_stat_unlock();
> > > +
> > same here, this code snip is not inside the original patch, and it's
> > not in latest upstream too.
>
> Both snippets came from the code before 41d2d848e5c0 that the patch is
> being reverted here.  As I explained in my original message, upstream is
> different because of 99dfc43ecbf6 which is not in 5.10.
oh, I missed it, you are right.
>
> > I think would be good keep it as the upstream version.
>
> If you don't include these lines, isn't this worse as it's not calling
> either part_start_io_acct or bio_start_io_acct (in 99dfc43ecbf6)?

Your patch is correct.
Sorry for the noise.

>
> --
> Guillaume Morin <guillaume@...infr.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ