[Gluster-devel] About locking subvolume in dht translator

Amar Tumballi atumball at redhat.com
Fri Apr 21 07:12:37 UTC 2017


On Fri, Apr 21, 2017 at 12:21 PM, Tahereh Fattahi <t28.fattahi at gmail.com>
wrote:

> 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.
>

Mostly because its a file and inode context is not present on all the
subvols?



>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-devel
>



-- 
Amar Tumballi (amarts)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20170421/649e2c02/attachment-0001.html>


More information about the Gluster-devel mailing list