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-next>] [day] [month] [year] [list]
Date:	Mon, 11 Dec 2006 12:04:14 +0200
From:	"Raz Ben-Jehuda(caro)" <raziebe@...il.com>
To:	"Jens Axboe" <jens.axboe@...cle.com>
Cc:	"Linux Kernel" <linux-kernel@...r.kernel.org>
Subject: Re: [patch 63/87] md: define raid5_mergeable_bvec

this is against 2.6.19-git17
hope this correct
raz

On 12/11/06, Jens Axboe <jens.axboe@...cle.com> wrote:
> On Mon, Dec 11 2006, Raz Ben-Jehuda(caro) wrote:
> > On 12/11/06, Jens Axboe <jens.axboe@...cle.com> wrote:
> > >On Sun, Dec 10 2006, akpm@...l.org wrote:
> > >> From: "Raz Ben-Jehuda(caro)" <raziebe@...il.com>
> > >>
> > >> This will encourage read request to be on only one device, so we will
> > >often be
> > >> able to bypass the cache for read requests.
> > >>
> > >> Signed-off-by: Neil Brown <neilb@...e.de>
> > >> Cc: Jens Axboe <jens.axboe@...cle.com>
> > >> Signed-off-by: Andrew Morton <akpm@...l.org>
> > >> ---
> > >>
> > >>  drivers/md/raid5.c |   24 ++++++++++++++++++++++++
> > >>  1 file changed, 24 insertions(+)
> > >>
> > >> diff -puN drivers/md/raid5.c~md-define-raid5_mergeable_bvec
> > >drivers/md/raid5.c
> > >> --- a/drivers/md/raid5.c~md-define-raid5_mergeable_bvec
> > >> +++ a/drivers/md/raid5.c
> > >> @@ -2611,6 +2611,28 @@ static int raid5_congested(void *data, i
> > >>       return 0;
> > >>  }
> > >>
> > >> +/* We want read requests to align with chunks where possible,
> > >> + * but write requests don't need to.
> > >> + */
> > >> +static int raid5_mergeable_bvec(request_queue_t *q, struct bio *bio,
> > >struct bio_vec *biovec)
> > >> +{
> > >> +     mddev_t *mddev = q->queuedata;
> > >> +     sector_t sector = bio->bi_sector + get_start_sect(bio->bi_bdev);
> > >> +     int max;
> > >> +     unsigned int chunk_sectors = mddev->chunk_size >> 9;
> > >> +     unsigned int bio_sectors = bio->bi_size >> 9;
> > >> +
> > >> +     if (bio_data_dir(bio))
> > >> +             return biovec->bv_len; /* always allow writes to be
> > >mergeable */
> > >
> > >Please don't ever do that - you are making assumptions on the value of
> > >READ and WRITE.
> > >
> > >        if (bio_data_dir(bio) == WRITE)
> > >                ...
> > >
> > >If this has already been merged, please submit a patch correcting it.
> > >People end up copying code like this :-)
> > >
> > >--
> > >Jens Axboe
> > >
> > >
> >
> > thanks Jens
> > the attached is a fix.
>
> But the patch is already merged, so the patch needs to be against Linus'
> current tree.
>
> --
> Jens Axboe
>
>


-- 
Raz

View attachment "mergeablevecJens.patch" of type "text/x-patch" (487 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ