| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2] xfs: truncate delalloc extents when IO fails in writeback |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 5 Mar 2010 04:21:05 -0500 |
| Cc: | Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
| In-reply-to: | <20100305020042.GM14317@xxxxxxxxxxxxxxxx> |
| References: | <1267667185-7736-1-git-send-email-david@xxxxxxxxxxxxx> <1267667185-7736-3-git-send-email-david@xxxxxxxxxxxxx> <20100304142851.GA19157@xxxxxxxxxxxxx> <20100304220309.GI14317@xxxxxxxxxxxxxxxx> <20100305020042.GM14317@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.19 (2009-01-05) |
On Fri, Mar 05, 2010 at 01:00:42PM +1100, Dave Chinner wrote: > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > We currently use block_invalidatepage() to clean up pages where I/O > fails in ->writepage(). Unfortunately, if the page has delalloc > regions on it, we fail to remove the delalloc regions when we > invalidate the page. This can result in tripping a BUG() in > xfs_get_blocks() later on if a direct IO read is done on that same > region - the delalloc extent is returned when none is supposed to be > there. > > Fix this by truncating away the delalloc regions on the page before > invalidating it. Because they are delalloc, we can do this without > needing a transaction. Indeed - if we get ENOSPC errors, we have to > be able to do this truncation without a transaction as there is > no space left for block reservation (typically why we see a ENOSPC > in writeback). Looks good. I also like the new assert to ensure no blocks actually get freed. Reviewed-by: Christoph Hellwig <hch@xxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS hang during xfs_fsr run, Michael Weissenbacher |
|---|---|
| Next by Date: | Re: [PATCH v2] xfsqa: define resblks for tests near ENOSPC, Christoph Hellwig |
| Previous by Thread: | [PATCH v2] xfs: truncate delalloc extents when IO fails in writeback, Dave Chinner |
| Next by Thread: | Re: [PATCH 2/3] xfs: truncate delalloc extents when IO fails in writeback, Christoph Hellwig |
| Indexes: | [Date] [Thread] [Top] [All Lists] |