Mark file as not ready when compressing it.

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>
Add cache_wait function.

This allows to block on files which are being compressed/decompressed.

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>
Fix wrong waiting condition in cache_get().

cache_get should wait via cache_wait() on ->ready variable, not on ->dead
variable.

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>
Wait in lazfs_getattr if cached file is not marked as "ready".

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>
Don't iterate over whole cache in cache_wait.

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>
Mark file as "ready" in lazfs_release after it's compressed and after all
renaming is done.

Signed-off-by: Adam Tkac <adam.tkac@geodis.cz>