On 29/10/14 00:11, Emmanuel Dreyfus wrote:
On Tue, Oct 28, 2014 at 06:07:29PM +0100, J. Hannken-Illjes wrote:Confused. If write and/or fsync are synchronous (VOP_PUTPAGES with flag PGO_SYNCIO) no write error will be forgotten.puffs_vnop_stratgy() contains this: /* * XXXXXXXX: wrong, but kernel can't survive strategy * failure currently. Here, have one more X: X. */ if (error != ENOMEM) error = 0; This is where we want to store the error so that it can be recovered by upper layer.
That comment is close to 10 years old. If you haven't, start by checking that it still applies and perhaps do a quick check to see what goes wrong (I don't remember exactly, some sort of kernel panic I think) and if it can be fixed.
And I still think that the best approach is to make the cache write-through, at least when a write causes a page fault, and then just deal with whatever distributed systemness happens behind the kernel driver's back.