]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
- Add locking to all filesystem operations in fdescfs and flag it as MPSAFE.
authorlulf <lulf@FreeBSD.org>
Sat, 24 May 2008 14:51:30 +0000 (14:51 +0000)
committerlulf <lulf@FreeBSD.org>
Sat, 24 May 2008 14:51:30 +0000 (14:51 +0000)
commit0bf5a314d88ca0c5df2f71ef6beb6bc4067223f5
tree236415ff1f2b33b277f193bd046392771ce6a318
parent197cf7b9ba868974b8a725176a65151c78822bea
- Add locking to all filesystem operations in fdescfs and flag it as MPSAFE.
- Use proper synhronization primitives to protect the internal fdesc node cache
  used in fdescfs.
- Properly initialize and uninitalize hash.
- Remove unused functions.

Since fdescfs might recurse on itself, adding proper locking to it needed some
tricky workarounds in some parts to make it work. For instance, a descriptor in
fdescfs could refer to an open descriptor to itself, thus forcing the thread to
recurse on vnode locks. Because of this, other race conditions also had to be
fixed.

Tested by: pho
Reviewed by: kib (mentor)
Approved by: kib (mentor)
sys/fs/fdescfs/fdesc.h
sys/fs/fdescfs/fdesc_vfsops.c
sys/fs/fdescfs/fdesc_vnops.c