tech-kern archive

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

Re: [PATCH] GOP_ALLOC and fallocate for puffs (round 2)



On 14 Oct 2014, at 19:05, Emmanuel Dreyfus <manu%netbsd.org@localhost> wrote:

> Hi
> 
> Here is the latest iteration of my patch to ensure we avoid sending data
> to the page cache we cannot flush later.
> http://ftp.espci.fr/shadow/manu/puffs-alloc.patch
> 
> - When writing, we make sure backend storage is allocated in two cases:
>  1) the file is sparse, hence we never know if backend storage is here.
>  2) the file grows: we know we need to allocated for the new area.
> - sparse file detection is done at when updating metadata cache: if
>  size is bigger than allocated blocks, it is sparse.
> - I add fallocate FUSE operation (userland support is in another patch)
>  for efficient backend storage allocation.
> - If fallocate is unavailable, I fallback to explicit zero-filling. 
> - puffs_vnop_write() is split into two functions, puffs_vnop_write_cache()
>  that writes in cache, puffs_vnop_write_fs that writes to the FS

First (and for the last time) GOP_ALLOC() should go to the backend, maybe
with a short circuit on non-sparse, not-after-eof files.

Zero filling looks wrong, as the region may contain valid data.

Whatever you do you should increment the protocol version number.

If you want to make UBC work with PUFFS fsx may help.  Last time
I tried it failed badly on a rump_ffs mount.  You may find it here:

http://www.netbsd.org/~hannken/fsx.tgz

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



Home | Main Index | Thread Index | Old Index