lkml.org 
[lkml]   [2013]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/23] dm: Refactor for new bio cloning/splitting
On Tue, Oct 29, 2013 at 08:09:08PM -0400, Mike Snitzer wrote:
> On Tue, Oct 29 2013 at 4:18pm -0400,
> Kent Overstreet <kmo@daterainc.com> wrote:
>
> > We need to convert the dm code to the new bvec_iter primitives which
> > respect bi_bvec_done; they also allow us to drastically simplify dm's
> > bio splitting code.
> >
> > Also kill bio_sector_offset(), dm was the only user and it doesn't make
> > much sense anymore.
> >
> > Signed-off-by: Kent Overstreet <kmo@daterainc.com>
> > Cc: Jens Axboe <axboe@kernel.dk>
> > Cc: Alasdair Kergon <agk@redhat.com>
> > Cc: dm-devel@redhat.com
> > ---
> > drivers/md/dm-thin.c | 8 ++-
> > drivers/md/dm.c | 170 ++++++---------------------------------------------
> > fs/bio.c | 38 ------------
> > include/linux/bio.h | 1 -
> > 4 files changed, 24 insertions(+), 193 deletions(-)
> >
> > diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
> > index a654024..1abb4a2 100644
> > --- a/drivers/md/dm-thin.c
> > +++ b/drivers/md/dm-thin.c
> > @@ -611,8 +611,10 @@ static void cell_defer_no_holder(struct thin_c *tc, struct dm_bio_prison_cell *c
> >
> > static void process_prepared_mapping_fail(struct dm_thin_new_mapping *m)
> > {
> > - if (m->bio)
> > + if (m->bio) {
> > m->bio->bi_end_io = m->saved_bi_end_io;
> > + atomic_inc(&m->bio->bi_remaining);
> > + }
> > cell_error(m->tc->pool, m->cell);
> > list_del(&m->list);
> > mempool_free(m, m->tc->pool->mapping_pool);
> > @@ -626,8 +628,10 @@ static void process_prepared_mapping(struct dm_thin_new_mapping *m)
> > int r;
> >
> > bio = m->bio;
> > - if (bio)
> > + if (bio) {
> > bio->bi_end_io = m->saved_bi_end_io;
> > + atomic_inc(&bio->bi_remaining);
> > + }
> >
> > if (m->err) {
> > cell_error(pool, m->cell);
>
> But now that I look closer, the above dm-thin.c hunks belong in:
> [PATCH 19/23] block: Generic bio chaining
>
> Seems these changes were mistakenly folded into this 17/23 patch?

...Whoops, fixed. Here's the new versions if you want to take a look:

http://evilpiepirate.org/git/linux-bcache.git/log/?h=for-jens
http://evilpiepirate.org/git/linux-bcache.git/commit/?h=for-jens&id=74f0f2084f88bb38403ca80bb98976f8219f9262


\
 
 \ /
  Last update: 2013-10-30 01:41    [W:0.073 / U:1.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site