Delay in establishing connection between client and server

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

 



Hi,

With the patches that add GlusterFS backend support to QEMU
(http://lists.nongnu.org/archive/html/qemu-devel/2012-06/msg01748.html),
I am seeing a problem where lookup and other routines fail since QEMU
ends up issuing posix calls (lookup, read etc) even before the
client-server connection is fully established.

To overcome this problem, I have put in a 1s sleep() after I do the
initialization and before any calls are issued to gluster backed. The
initialization involves setting up the gluster context, allocating the
required pools, generating and activating the xlator graph. If I don't
have this delay, the first lookup fails in client_lookup() as function
pointer table is still not set (in client_lookup(), conf->fops is
NULL). I see that this setting happens after the RPC communication is
established b/n client and the server. Things work with 1s delay when
I am using a simple volume file (with just the client xlator) and I
have had to resort to bigger delays when using full-blown volume
files.

Using this arbitrary delay of 1s from QEMU backend driver is a hack
and I would like to know if there is a better and cleaner way solve
this problem. Note that in QEMU, we do gluster_init() and immediately
go ahead and do gluster_open() of the image file.

Regards,
Bharata.
-- 
http://bharata.sulekha.com/blog/posts.htm, http://raobharata.wordpress.com/



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux