[Gluster-devel] About locking subvolume in dht translator

Tahereh Fattahi t28.fattahi at gmail.com
Fri Apr 21 06:51:06 UTC 2017


Hi
I want add some code in dht_create before doing create in hashed_subvol.
I want write something in all subvols with setxattr operation.
My problem is that when I want get lock (write lock) on subvols, I get
error:

pending frames:
frame : type(1) op(CREATE)
frame : type(1) op(CREATE)
frame : type(0) op(0)
patchset: git://git.gluster.com/glusterfs.git
signal received: 11
time of crash:
2017-04-21 06:38:23
configuration details:
argp 1
backtrace 1
dlfcn 1
.
.
.
But if I just get lock on one subvol, the step of getting locks do
correctly.
I dont know the problem! Are subvols that get from layout from a file
parent inode fake?? (from dht_get_layout function)
If I get these locks from a directory for example in a setxattr operation,
there is no problem.
The function of lock is dht_blocking_inodelk in dht_commom.c and the
operation

STACK_WIND_COOKIE (frame, dht_blocking_inodelk_cbk,
                           (void *) (long) i,
                           local->lock.locks[i]->xl,
                           local->lock.locks[i]->xl->fops->inodelk,
                           local->lock.locks[i]->domain,
                           &local->lock.locks[i]->loc, F_SETLKW, &flock,
NULL);

(in dht_blocking_inodelk_rec function )raise error.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20170421/2ef7de5e/attachment.html>


More information about the Gluster-devel mailing list