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 26 Oct 2014, at 03:52, Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:

> Chuck Silvers <chuq%chuq.com@localhost> 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?

- Increment PUFFSVERSION.

- You should recover the error in puffs_vnop_close() too.

- Are you sure pn_sizemtx is still needed?  VOP_GETATTR() works on
  locked vnodes since 2011-10-30.

--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)



Home | Main Index | Thread Index | Old Index