tech-kern archive

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

Re: [PATCH] PUFFS backend allocation (round 3)



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.

> If one of these VOP_PUTPAGES is async the write error will be delayed 
> and if the next (and last) operation is VOP_CLOSE this is the last chance to
> report the error back.  If any intermediate operation returns a delayed
> error to the application it is cleared and close will no longer see it.
(...)
> There is no close after close.  Once a file is closed it may return
> a delayed error but has to close anyway.  This is how NFS works and
> what applications expect.

Let me rephrase: I call close(), get a error because of a failed
asynchronous write. The file is not closed, right? Now if I call
close again, what should happen? Success? 

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index