[Gluster-devel] posix-locks under AFR not working for server+client in one process

Rommer rommer at active.by
Wed Oct 15 10:57:06 UTC 2008


Hello,

> >
> > ########### afr #############
> > volume afr
> >  type cluster/afr
> >  subvolumes io-thr remote  
> 
> Here change the order of the subvolumes. i.e as
>  subvolumes remote io-thr
>   

This is not working.
I've made some dirty hack of
xlators/features/posix-locks/src/posix-locks.c:
--- posix-locks.c.orig  2008-04-11 07:59:29.000000000 +0300
+++ posix-locks.c       2008-10-15 05:46:31.000000000 +0300
@@ -461,10 +461,12 @@
 int
 posix_setlk (pl_inode_t *inode, posix_lock_t *lock, int can_block)
 {
   errno = 0;
 
+  printf ("posix_setlk: inode=%p\n", inode);
+
   if (lock_grantable (inode, lock)) {
     insert_and_merge (inode, lock);
   }
   else if (can_block) {
 #ifdef _POSIX_LOCKS_DEBUG

Next, I ran glusterfs by the following command:
# glusterfs -f /etc/glusterfs/glfs.vol -n ra -N /mnt/shared 
And found that posix-locks module receive different inode structure 
for locking the same file from different nodes:

posix_setlk: inode=0x9a084f0
posix_setlk: inode=0x9a07420

In glusterfsd/glusterfs configuration (via loopback interface) function
posix_setlk always receive the same inode structure for locking one
file from any node.

Rommer.





More information about the Gluster-devel mailing list