Whamcloud - gitweb
Fix flush-on-destroy so that it locks the same resource (i.e. the objid and
not the inode number) as what the clients are locking.
Re-enable flush-on-close, because flush-on-destroy has a deadlock:
- client is writing to object (so has a write extent lock), so
filter_brw_write() (via filter_fid2dentry()) needs a read lock on
parent dir to do the object lookup
- client unlinks object (so gets write lock on parent) and then grabs the
write extent lock on same object in order to flush pages
Solutions are:
- grab extent lock before parent directory lock (a bit messy, but doable)
- send file handle with writes to avoid lookup (needs some way to pass
handle to inode, and doesn't really help us since file is now allowed
to be closed before writing is complete)