The patch titled O_SYNC error handling fix has been removed from the -mm tree. Its filename is o_sync-error-handling-fix.patch This patch was dropped because it is obsolete ------------------------------------------------------ Subject: O_SYNC error handling fix From: Chris Mason <mason@xxxxxxxx> If we hit errors during generic_osync_inode(), generic_file_buffered_write will still return written ? written : status; This patch ensures the -EIO gets back up to userland at all times. Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- mm/filemap.c | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff -puN mm/filemap.c~o_sync-error-handling-fix mm/filemap.c --- devel/mm/filemap.c~o_sync-error-handling-fix 2006-01-15 23:52:20.000000000 -0800 +++ devel-akpm/mm/filemap.c 2006-01-15 23:52:20.000000000 -0800 @@ -2027,7 +2027,6 @@ generic_file_buffered_write(struct kiocb balance_dirty_pages_ratelimited(mapping); cond_resched(); } while (count); - *ppos = pos; if (cached_page) page_cache_release(cached_page); @@ -2048,10 +2047,24 @@ generic_file_buffered_write(struct kiocb * to buffered writes (block instantiation inside i_size). So we sync * the file data here, to try to honour O_DIRECT expectations. */ - if (unlikely(file->f_flags & O_DIRECT) && written) + if (unlikely(file->f_flags & O_DIRECT) && status >= 0 && written) status = filemap_write_and_wait(mapping); pagevec_lru_add(&lru_pvec); + + /* + * We must let know userspace if something hasn't been written + * correctly. If we got an I/O error it means we got an hardware + * failure, anything can be happening to the on-disk data, + * letting know userspace that a bit of data might have been + * written correctly on disk is a very low priority, compared + * to letting know userspace that some data has _not_ been + * written at all. + */ + if (unlikely(status == -EIO)) + return status; + *ppos = pos; + return written ? written : status; } EXPORT_SYMBOL(generic_file_buffered_write); _ Patches currently in -mm which might be from mason@xxxxxxxx are sched-fix-smt-nice-lock-contention-and-optimization.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html