On Tue, May 16, 2017 at 07:37:37AM -0700, Christoph Hellwig wrote:
> > }
> >
> > +struct bio *btrfs_bio_clone_partial(struct bio *orig, gfp_t gfp_mask, int
> > offset, int size)
> > +{
> > + struct bio *bio;
> > +
> > + bio = bio_clone_fast(orig, gfp_mask, btrfs_bioset);
> > + if (bio) {
> }
>
> +struct bio *btrfs_bio_clone_partial(struct bio *orig, gfp_t gfp_mask, int
> offset, int size)
> +{
> + struct bio *bio;
> +
> + bio = bio_clone_fast(orig, gfp_mask, btrfs_bioset);
> + if (bio) {
bio_clone_fast will never fail when backed by a bioset, which this
one always
On Mon, Apr 17, 2017 at 06:16:23PM -0700, Liu Bo wrote:
> Currently when mapping bio to limit bio to a single stripe length, we
> split bio by adding page to bio one by one, but later we don't modify
> the vector of bio at all, thus we can use bio_clone_fast to use the
> original bio vector
Currently when mapping bio to limit bio to a single stripe length, we
split bio by adding page to bio one by one, but later we don't modify
the vector of bio at all, thus we can use bio_clone_fast to use the
original bio vector directly.
Signed-off-by: Liu Bo
---