Atomic operation requires to hold a lock for longer period than
single metadata I/O. Update locks so that we can:
- lock a device more than once (lock ref counting)
- reaquire read lock on already held write lock (write lock
is stronger than read lock)