]> git.neil.brown.name Git - LaFS.git/commit
Fix iolock semantics.
authorNeilBrown <neilb@suse.de>
Mon, 24 Aug 2009 03:30:30 +0000 (13:30 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Aug 2009 03:30:30 +0000 (13:30 +1000)
commit9e24e518a9d6f32e42eb867da27efed4c82ac836
tree42e584fb2012c0ef33cfafd90cccfd63ba6c6f81
parent2ca821f5f65a898d317922c7d42d597858aed25f
Fix iolock semantics.

There are some races with IOlock and page unlock due to bad
assumption.
So make things more explicit with a flag to say if we own
the lock, or the 'Writeback' flag.

This allows us to remove the extra flag to iounlock_block
which is really nice because it always confused me.

A significant but subtle part of the locking involved the
fact that one a page has been read, it will not be read
again, so when readpage calls lafs_iocheck_block it is not
possible that it will unlock incorrectly.
It could conceivably unwriteback incorrectly, but next patch
should fix that.
13 files changed:
block.c
checkpoint.c
clean.c
cluster.c
file.c
index.c
inode.c
io.c
lafs.h
modify.c
roll.c
snapshot.c
state.h