96c935e33b
This is required to avoid data corruption bugs, where a getattr slices itself within a setattr operation, and sets the size to the stall value it got from the filesystem. That value is smaller than the one set by setattr, and the call to uvm_vnp_setsize() trigged a spurious truncate. The result is a chunk of zeroed data in the file. Such a situation can easily happen when the ioflush thread issue a VOP_FSYNC/puffs_vnop_sync/flushvncache/dosetattrn while andother process do a sys_stat/VOP_GETATTR/puffs_vnop_getattr. This mutex on size operation can be removed the day we decide VOP_GETATTR has to operated on a locked vnode, since the other operations that touch size already require that. |
||
---|---|---|
.. | ||
files.puffs | ||
Makefile | ||
puffs_compat.c | ||
puffs_msgif.c | ||
puffs_msgif.h | ||
puffs_node.c | ||
puffs_subr.c | ||
puffs_sys.h | ||
puffs_vfsops.c | ||
puffs_vnops.c | ||
TODO |