tech-kern archive

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

Re: [PATCH] Re: zero-filed page on VOP_PUTPAGES


> YAMAMOTO Takashi <> wrote:
>> alternatively, using puffs_msg_setcall, i think you can make GETATTR
>> reliably know if there's a pending SETATTR or not.
>> if there's a pending SETATTR, GETATTR can ignore a part of the reply
>> from the file server and returns the kernel's idea of the file attributes
>> instead.
> That seems the best way, but you need to do it everywhere
> uvm_vnp_setsize() is called, that is:
> puffs_vnop_getattr
> dosetattr
> puffs_vnop_write

uvm_vnp_setsize merely changes the kernel's idea of the size of the file.
i think puffs_vnop_getattr already checks PNODE_METACACHE_* flags for cases
like this.

> It seems useless in puffs_getvnode since no race can occur there,
> though.
> We would have a PNODE_IN_RESIZE flag for struct pnode's pn_stat, set and
> cleared in dosetattr(), and use vp->v_size on uvm_vnp_setsize() calls
> when set? Or just avoid uvm_vnp_setsize() calls?

just avoid the calls.


> -- 
> Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index