The state of Giant lock in the file systems?

Ivan Voras ivoras at
Mon Nov 8 14:38:43 UTC 2010

On 11/08/10 15:31, Gleb Kurtsou wrote:
> On (08/11/2010 13:28), Ivan Voras wrote:
>> I was looking at fusefs sources and there is a dance it does with the
>> Giant lock which looks fishy.
> It's intended to be fishy. No kernel level locks should be held before
> returning to userland, in other words on each syscall vnode is locked (+
> Gaint lock for fs if needed), than it's unlocked by filesystem and
> relocked upon callback from userspace. puffs is MPSAFE if that could be
> of any help for you.

I don't think we're talking completely about the same thing here.

I'm talking about fuse's DO_GIANT_MANUALLY flag, with awareness that
fuse does:

473 #ifdef MNTK_MPSAFE
474         mp->mnt_kern_flag |= MNTK_MPSAFE;
475 #endif

What are you talking about?

More information about the freebsd-fs mailing list