hi, > Emmanuel Dreyfus <[email protected]> wrote: > >> Please consider the test case below, ran on a PUFFS/perfuse/glusterfs >> mount. A look at the PUFFS operation trace shows that the kernel sends >> ADVLOCK for f0, f1 and m when a lock is requested on m. > > Here is where the extra ADVLOCK happen: > sys_exit -> exit1 -> fd_free -> fd_close -> VOP_ADVLOCK > > In a nutshell, NetBSD clears locks on all file descriptor when a process > exit, that include read-only descriptors, and FUSE filesystems seem to > be unconfortable with that. > > I am not sure of where this should be fixed: should we avoid unlocking > read-only files in fd_close()? That seems a good idea performance-wise. > > Or is it a desirable behavior on native filesystems while being a bug > for FUSE filesystems? In that case, it means I need to filter the > operation in perfused.
it seems normal for native filesystems. RDONLY is enough to set shared locks on the file. i think it's safe to filter them using per vnode or puffs_node PK_ADVLOCK-like "might have posix locks" hint. YAMAMOTO Takashi > > -- > Emmanuel Dreyfus > http://hcpnet.free.fr/pubz > [email protected]
