I want to check the existence of file lock on a file in gluster file system. So that I can see from any host that whether file lock is held by any process (remote or local) on file in gluster file system.
For Example:
I have two host: h1 and h2, both with RHEL 7.2. I have one application on host h1 which has acquired the file lock on a file in gluster file system using pthread_rwlock_wrlock API. After sometimes I poweroff host h1.
Now from h2 I am using pthread_rwlock_trywrlock to see whether any lock is held on this file or not. this retuning me EBUSY till 30 minutes of poweroff of h1(its looking as if application from h1 has still held lock on it). After around 30 minutes pthread_rwlock_trywrlock returning 0.
Is there any way I can quickly check that a file in gluster is held by any any process or not?