Re: [Gluster-devel] Determine if a file is open in a cluster

2018-01-12 Thread Ram Ankireddypalle
-devel] Determine if a file is open in a cluster Another simple test in code would be to check whether inode->fd_list is empty as fd_list represents list of all fds opened on that inode. On Fri, Jan 12, 2018 at 4:38 AM, Vijay Bellur mailto:vbel...@redhat.com>> wrote: Hi Ram, Do you want

Re: [Gluster-devel] Determine if a file is open in a cluster

2018-01-11 Thread Raghavendra G
Another simple test in code would be to check whether inode->fd_list is empty as fd_list represents list of all fds opened on that inode. On Fri, Jan 12, 2018 at 4:38 AM, Vijay Bellur wrote: > Hi Ram, > > Do you want to check this from within a translator? If so, you can look > for GLUSTERFS_OPE

Re: [Gluster-devel] Determine if a file is open in a cluster

2018-01-11 Thread Vijay Bellur
Hi Ram, Do you want to check this from within a translator? If so, you can look for GLUSTERFS_OPEN_FD_COUNT in xlators like dht, afr, ec etc. where they check for open file descriptors in various FOPs. Regards, Vijay On Thu, Jan 11, 2018 at 10:40 AM, Ram Ankireddypalle wrote: > Hi, > >

[Gluster-devel] Determine if a file is open in a cluster

2018-01-11 Thread Ram Ankireddypalle
Hi, Is it possible to find out within a cluster if a file is currently open by any of the clients/self-heal daemon or any other daemon's within a cluster. Please point to the sample code in any of the Xlator which does such a check. Thanks and Regards, Ram ***Legal