Re: [PATCH] dm-bufio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 17, 2011 at 10:05:26AM -0400, Mikulas Patocka wrote:
> 
> 
> On Mon, 17 Oct 2011, Joe Thornber wrote:
> 
> > On Fri, Oct 14, 2011 at 03:14:34PM -0400, Mikulas Patocka wrote:
> > @@ -493,8 +500,10 @@ static void use_inline_bio(struct dm_buf
> >  static void submit_io(struct dm_buffer *b, int rw, sector_t block,
> >                       bio_end_io_t *end_io)
> >  {
> > -       if (b->c->block_size <= DM_BUFIO_INLINE_VECS * PAGE_SIZE &&
> > -           b->data_mode != DATA_MODE_VMALLOC)
> > +       if (rw == WRITE && b->c->write_callback)
> > +               b->c->write_callback(b);
> >         if (likely(b->c->block_size <= DM_BUFIO_INLINE_VECS * PAGE_SIZE) &&
> >             likely(b->data_mode != DATA_MODE_VMALLOC))
> >                 use_inline_bio(b, rw, block, end_io);
> >         else
> >                 use_dmio(b, rw, block, end_io);
> > @@ -550,8 +559,6 @@ static void __write_dirty_buffer(struct
> >         clear_bit(B_DIRTY, &b->state);
> >         wait_on_bit_lock(&b->state, B_WRITING,
> >                          do_io_schedule, TASK_UNINTERRUPTIBLE);
> > -       if (b->c->write_callback)
> > -               b->c->write_callback(b);
> >         submit_io(b, WRITE, b->block, write_endio);
> >  }
> > 
> > 
> > This doesn't seem an improvement.  Except ... it changes the behaviour
> > of dm_bufio_release_move().  So was there a preexisting bug in
> > dm_bufio_release_move() that you're trying to fix with this patch?
> 
> The actual reason was to do this callback in dm_bufio_release_move() too 
> --- just for consistency. (the user of dm_bufio_release_move() doesn't use 
> write_callback anyway).

thinp uses dm_bufio_release_move() and write_callback.  So yes, this
is a bug fix.  I thought so and merged.

- Joe

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel


[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux