Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579793

Re: [PATCH v1 2/5] md/raid1: use bio_clone_bioset_partial() in case of write behind

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v1 2/5] md/raid1: use bio_clone_bioset_partial() in case of write behind
Date 2017-02-13 14:50 +0100
Message-ID <tapaW-4mz-15@gated-at.bofh.it> (permalink)
References <t9h5M-2lX-13@gated-at.bofh.it> <t9h5M-2lX-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> +		struct bio *mbio = NULL;
> +		int offset;
>  		if (!r1_bio->bios[i])
>  			continue;
>  
> -		mbio = bio_clone_mddev(bio, GFP_NOIO, mddev);
> -		bio_trim(mbio, r1_bio->sector - bio->bi_iter.bi_sector,
> -			 max_sectors);
> +		offset = r1_bio->sector - bio->bi_iter.bi_sector;

I think offset should be a sector_t.

Otherwise this looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v1 2/5] md/raid1: use bio_clone_bioset_partial() in case of write behind Ming Lei <tom.leiming@gmail.com> - 2017-02-10 12:00 +0100
  Re: [PATCH v1 2/5] md/raid1: use bio_clone_bioset_partial() in case  of write behind Christoph Hellwig <hch@infradead.org> - 2017-02-13 14:50 +0100

csiph-web