[Gluster-devel] Writing at subvolumes

Pranith Kumar Karampuri pkarampu at redhat.com
Tue Jul 24 06:41:10 UTC 2012


Contents of the backtrace would be helpful.
Look at any cluster xlators like afr, dht, stripe to see how same fop is sent to more than one child.

Pranith
----- Original Message -----
From: Gustavo Bervian Brand <gugabrand at gmail.com>
To: gluster-devel at nongnu.org
Sent: Sun, 22 Jul 2012 07:49:39 -0400 (EDT)
Subject: [Gluster-devel] Writing at subvolumes

Hello,

  I am debugging a basic translator that was created based on the rot-13
example, but I'd like to gather more info on how to procede at the example
below.
  So, the volfile I'm using is very basic, with two directories(bricks)
configured as posix volumes and my translator using both as subvolumes.

  Now suppose I want to write the same file on both subvolumes (like an
echo "abc" > /mnt/glustermount/test.txt).
  I tried to loop through the this->children list at the writev function,
calling the writev of each subvolume (as copied below) instead of the
FIRST_CHILD macro.
  At the 1st subvolume it was ok, but at the second one I got a
segmentation fault when calling the STACK_WIND complaining about
pthread_spin_lock.

  What other kind of structure/control I'd need to build to replicate the
content over all the subvolumes I have?
  What I want at first is to know how I can control the write over
different subvolumes, so any hint here is welcome.

190         xlator_list_t *list = this->children ;
191         while (list) {
192                 STACK_WIND (frame, gbfs_writev_cbk, list->xlator,
193                                 list->xlator->fops->writev, fd, vector,
count, off,
194                                 flags, iobref, xdata);
195                 list=list->next;
196         }

Thanks,
Gustavo Brand
---------------------------------------------------------------------------------





More information about the Gluster-devel mailing list