rozofsmount local buffer flushing and reset on lock set/remove
To share a file between applications a writing application may :
- acquire a write lock on a file segment
- write this segment
- release the lock on this segment
At the time it releases the lock the pending written data in the file_t
buffer must be flushed to disk in order for the other applications on
any rozofsmount client that acquire a lock on this segment to access to
these new data immediately.
When an application acquires a lock, its buffer in the file_t structure
must be emptied so that when the application reads data, it reads fresh
data from disk and does not use old data that may be already present for
some times in its buffer.