xfs
[Top] [All Lists]

Re: [PATCH 2/3] xfs: don't release bios on completion immediately

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH 2/3] xfs: don't release bios on completion immediately
From: Christoph Hellwig <hch@xxxxxx>
Date: Fri, 11 Mar 2016 15:47:58 +0100
Cc: Christoph Hellwig <hch@xxxxxx>, xfs@xxxxxxxxxxx, Dave Chinner <dchinner@xxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160303151722.GB57990@xxxxxxxxxxxxxxx>
References: <1456302011-18915-1-git-send-email-hch@xxxxxx> <1456302011-18915-3-git-send-email-hch@xxxxxx> <20160303151722.GB57990@xxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.17 (2007-11-01)
On Thu, Mar 03, 2016 at 10:17:22AM -0500, Brian Foster wrote:
> > +xfs_finish_page_writeback(
> > +   struct page     *page,
> > +   unsigned int    start,
> > +   unsigned int    end,
> > +   int             error)
> > +{
> > +   struct buffer_head      *head, *bh;
> > +   unsigned int            off = 0;
> > +
> > +   bh = head = page_buffers(page);
> > +
> > +   do {
> > +           if (start > off)
> > +                   goto next_bh;
> 
> Probably not an issue for current usage, which appears to be on buffer
> size granularity, but shouldn't this check whether start is beyond the
> end of the current buffer (e.g., start >= off + bh->b_size)?

I don't understand that question.  We get called for a given page,
and a start and end offset inside that page.  These offsets by design
need to be aligned to the filesystem blocksize.  So what we basically
want is to skip a few buffers at the beginning and/or end of the page,
and the code seems to handle that fine.

> >     mempool_free(ioend, xfs_ioend_pool);
> >  }
> >  
> > +
> 
> Unnecessary whitespace here.

Fixed.

<Prev in Thread] Current Thread [Next in Thread>