Whamcloud - gitweb
b=2313
authorphil <phil>
Fri, 5 Dec 2003 03:15:19 +0000 (03:15 +0000)
committerphil <phil>
Fri, 5 Dec 2003 03:15:19 +0000 (03:15 +0000)
commit55bc4d0b900af9e9048c24c08ca558fc3d007b2f
tree94d53d4b23fa7a0d94141bc50a5c58fb711d1be5
parent1f3842a585caf3fb503356efa454128474a76b63
b=2313
r=shaver
This bug happens when a file is opened twice for write, then both close it
at the same time.  If they both drop the writecount, then race to
compare it against 0, one will free the fsdata and the other will assert.

This looks like a big patch, but it's mostly plumbing. I had to do some
different argument passing, in order to keep everything protected under the
same lock.

I removed the writecount spinlock, and use the epoch semaphore for all three
things: management of the epoch, protection of the writecount, and atomicity of
writecount modifications which result in allocation or freeing of the fsdata.
lustre/mds/mds_open.c