[PATCH] don't report async write errors on close() after all
I had second thoughts on this. Reporting background writeout errors via close() only really makes sense if allthe IO has completed anyway: ie, the app has had the fd open without writing to it for many tens of seconds. It would be OK if it was harmless, but it is not. Changes are, applications ignore errors from close(). So if an application does a fork/exit and the child correctly does an fsync() of the fd, the close-on-exit will have wiped out any accumulated EIO/ENOSPC errors. Or if someone does dup()/close()/fsync(), the fsync() could fail to detect earlier errors, thanks to the close. So. The clear-and-report of errors on close() makes the reporting of errors on fsync/msync/fdatasync less reliable.
Showing
Please register or sign in to comment