NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

How does NetBSD handle fsync() that incurs I/O errors?

I have just been pointed at a postgresql mailing list discussion about a
scenario where a program has written data to a file descriptor, calls
fsync(), there is an I/O error in writing the data out, and the program
re-tries the fsync() until it returns success.

On Linux, that can apparently leave your data unwritten. It forgets the
I/O error after the first try.

As far as I know, NetBSD leaves dirty buffers marked dirty in case of
error, so that they are retried again later. Is my understanding right?


original mail:

Referenced issue on stackoverflow about what the Linux kernel does:

Quote from email thread:

    I found your discussion with kernel hacker Jeff Layton at in which he said: "The stackoverflow
    writeup seems to want a scheme where pages stay dirty after a
    writeback failure so that we can try to fsync them again. Note that
    that has never been the case in Linux after hard writeback failures,
    AFAIK, so programs should definitely not assume that behavior."

I hope that NetBSD does leave the pages dirty, because that's the only
thing that makes sense, right?

___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/      -- are condemned to reinvent it. Poorly.

Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index