Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread Emmanuel Dreyfus
Here is my latest patch: http://ftp.espci.fr/shadow/manu/puffs-falloc.patch The whole thing is not very satisfying. Here are a few issues: - if we do not have fallocate and go the emulation way writing zeroes, we must first call VOP_PUTPAGES for the whole vnode so that no data remain in th cache

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread Emmanuel Dreyfus
J. Hannken-Illjes wrote: > Ok -- if you want to use it, you have to implement it on the client side > as puffs has no idea how to allocate blocks -- right? Here is my GOP_ALLOC so far. If available, use fallocate, otherwise write zeroes. puffs_vnop_write() was split into puffs_vnop_write_cache()

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread J. Hannken-Illjes
On 02 Oct 2014, at 19:09, Emmanuel Dreyfus wrote: > J. Hannken-Illjes wrote: > >> Please describe "cached write operation" in terms of vnode operations. > > A write on a mount that uses page cache, without direct I/O. > >> Which vnode operation finally calls GOP_ALLOC()? > > From genfs, onl

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread Emmanuel Dreyfus
J. Hannken-Illjes wrote: > Please describe "cached write operation" in terms of vnode operations. A write on a mount that uses page cache, without direct I/O. > Which vnode operation finally calls GOP_ALLOC()? >From genfs, only VOP_GETPAGES, but I understand we should call it on our own. For

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread J. Hannken-Illjes
On 02 Oct 2014, at 17:23, Emmanuel Dreyfus wrote: > On Thu, Oct 02, 2014 at 12:02:39PM +0200, J. Hannken-Illjes wrote: >> GOP_ALLOC() gets called from VOP_GETPAGES() for missing pages. Here you >> run VOP_PUTPAGES() on a range known to be unmapped so it becomes a NOP. >> >> GOP_ALLOC() aka puff

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread Emmanuel Dreyfus
On Thu, Oct 02, 2014 at 12:02:39PM +0200, J. Hannken-Illjes wrote: > GOP_ALLOC() gets called from VOP_GETPAGES() for missing pages. Here you > run VOP_PUTPAGES() on a range known to be unmapped so it becomes a NOP. > > GOP_ALLOC() aka puffs_gop_alloc() has to run on the client to make > sure the

Re: [PATCH] GOP_ALLOC and fallocate for PUFFS

2014-10-02 Thread J. Hannken-Illjes
On 02 Oct 2014, at 06:45, Emmanuel Dreyfus wrote: > J. Hannken-Illjes wrote: > >> genfs_gop_write calls genfs_do_io which does "error = biowait(mbp);" >> near the end. This will catch errors from VOP_STRATEGY. > > I run the code below but VOP_PUTPAGES never return anything else than 0. Sure