[Gluster-devel] empty xlator

Lluís Pàmies i Juárez llpamies at pamies.cat
Wed Feb 5 23:26:45 UTC 2014


Hello,

As a proof of concept I'm trying to write a xlator that does nothing, I
call it "nop". The code for "nop.c" is simply:

#include "config.h"
#include "call-stub.h"
struct xlator_fops fops = {};
struct xlator_cbks cbks = {};
struct xlator_dumpops dumpops = {};
struct volume_options options[] = {{.key={NULL}},};
int32_t init (xlator_t *this){return 0;}
int fini (xlator_t *this){return 0;}


And I compile it with:
$ gcc -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_LINUX_HOST_OS -shared
-nostartfiles -lglusterfs -lpthread -I${GFS} -I${GFS}/libglusterfs/src
-I${GFS}/contrib/uuid nop.c -o nop.so

Then, if I try a test.vol file like that:

volume test-posix
    type storage/posix
    option directory /home/llpamies/Projects/gluster/test-split/node0-data
end-volume

volume test-nop
    type features/nop
    subvolumes test-posix
end-volume

volume test-cache
  type performance/io-cache
  subvolumes test-nop
end-volume


and mount it with:
$ glusterfs --debug -f test.vol /mount/point

It seems to work fine, doing nothing. However, when used together with the
stripe xlator as follows:

volume test-posix0
    type storage/posix
    option directory /home/llpamies/Projects/gluster/test-split/node0-data
end-volume

volume test-posix1
    type storage/posix
    option directory /home/llpamies/Projects/gluster/test-split/node1-data
end-volume

volume test-nop0
    type features/nop
    subvolumes test-posix0
end-volume

volume test-nop1
    type features/nop
    subvolumes test-posix1
end-volume

volume test-stripe
    type cluster/stripe
    subvolumes test-nop0 test-nop1
end-volume


Glusterfs hangs during the first fuse lookup for ".Trash", and /mount/point
looks unmounted with ???? permissions etc.

Does it look like some bug in the stripe xlator or is there something
fundamentally wrong with the nop xlator?

Thank you,

-- 
Lluís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20140205/9fa2e2fb/attachment-0001.html>


More information about the Gluster-devel mailing list