Chuck Silvers <c...@chuq.com> wrote: > but more fundamentally, since puffs code cannot prevent changes to the file > in the underlying fs (ie. changes that don't go through puffs), any > preallocation done by puffs can be undone before it does any good. > the puffs code just needs to be fixed to handle such ENOSPC/EDQUOT errors > while flushing pages without hanging. NFS has the same fundamental issue > but I suspect its error handling is better.
I tried the same approach as NFS: save errors in VOP_STRATEGY and recover them in upper layer: http://ftp.espci.fr/shadow/manu/puffs-strategy-error.patch Opinions? Tests show that it behave gracefuly when encountering EDQUOT: no more processes hung in DE state and the correct errno is reported. The patch also contains fallocate and fdiscard implementation, which are now of no use, but I think it is good to have them ready for later. On the fdiscard front, I wonder if I should hold pn_sizemtx. It is not supposed to change file size, but what happens if file size is changed during the operation? -- Emmanuel Dreyfus http://hcpnet.free.fr/pubz m...@netbsd.org