Here's a patch to handle error return values in fs_flush_pages and fs_flushinval_pages. It changes the prototype of fs_flushinval_pages so we can propogate the errors and handle them at higher layers. I also modified xfs_itruncate_start so that it could propogate the error further. I've changed the necessary prototypes on 2.4 to keep the build happy but haven't bothered to fix the error handling in fs_flush_pages or fs_flushinval_pages for 2.4. The motivation behind this change was the recent BUG reported due to a direct I/O read trying to write to delayed alloc extents. While the exact cause of this problem is not known it is possible that fs_flushinval_pages ignored an error while flushing, truncated the pages on the file anyway, and failed to convert all delayed alloc extents. Lachlan