Hello. Are you seeing this behavior in NetBSD-5? I've been working on porting ufs fixes from David Holland back into 5.x, and I've seen too many unlocks taken on a given file, and have been wondering where they come from. I'm not sure it's the same bug, but your finding sounds interesting. -thanks -Brian
On Nov 11, 11:11am, Emmanuel Dreyfus wrote: } Subject: Re: PUFFS ADVLOCK is too greedy } 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. } } -- } Emmanuel Dreyfus } http://hcpnet.free.fr/pubz } [email protected] >-- End of excerpt from Emmanuel Dreyfus
