gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] empty xlator


From: Lluís Pàmies i Juárez
Subject: [Gluster-devel] empty xlator
Date: Wed, 5 Feb 2014 15:26:45 -0800

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]