On Tue, Feb 07, 2017 at 12:14:51PM -0800, Liu Bo wrote:
> > +                           end_page_writeback(page);
> > +           }
> > 
> >             cur = cur + iosize;
> >             pg_offset += iosize;
> > @@ -3767,7 +3770,8 @@ static noinline_for_stack int write_one_eb(struct
> > extent_buffer *eb,
> >             epd->bio_flags = bio_flags;
> >             if (ret) {
> >                     set_btree_ioerr(p);
> > -                   end_page_writeback(p);
> > +                   if (PageWriteback(p))
> > +                           end_page_writeback(p);
> >                     if (atomic_sub_and_test(num_pages - i, &eb->io_pages))
> >                             end_extent_buffer_writeback(eb);
> >                     ret = -EIO;
> > 
> > ---
> > 
> 
> Looks good, could you please make a comment for the if statement in your
> commit log so that others could know why we put it?

Thank you both. Please resend v2 so I can add it to 4.11 queue.
> 
> Since you've got a reproducer, baking it into a fstests case is also
> welcome.

AFAICS the reproducer needs a kernel patch so the memory allocation
fails reliably, this is not suitable for fstests. We don't have an easy
way to inject allocation failures easily, but some reduced steps to
reprroduce could be added to the changelog.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to