[Gluster-devel] Safe to use synctask within a syncop_ipc?

Raghavendra Gowdappa rgowdapp at redhat.com
Fri Aug 26 04:55:33 UTC 2016



----- Original Message -----
> From: "dnunez" <dnunez at redhat.com>
> To: gluster-devel at gluster.org
> Sent: Thursday, August 25, 2016 10:59:02 PM
> Subject: [Gluster-devel] Safe to use synctask within a syncop_ipc?
> 
> Hello,
> 
> Is it safe to use a synctask within a syncop_ipc? I think it should be
> fine since the syncop will continue alongside the synctask. However, I
> do not know enough about the two to be absolutely sure.

Couple of factors to consider while using syncops:

1. Are you using syncops in synchronous (with cbk argument as NULL) or asynchronous manner (with a non-null argument)?
2. If using in synchronous manner, the thread which is invoking syncop_** is blocked till the task is complete. If for any reason the caller thread is required for completion of task (lets say task involves processing of a reply from server and blocked thread is the thread which reads from socket and processes reply - this is just one such example and there can be many other such examples), there will be deadlocks. We need to make sure such a thing shouldn't happen.

With these data-points you should be able to make decision based on your use-case.

regards,
Raghavendra

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


More information about the Gluster-devel mailing list