On Thu, Jul 26, 2012 at 12:14 PM, Anand Avati <anand.avati@xxxxxxxxx> wrote: > ret of 1 is intentional to indicate that glfs_init() could not complete yet. > 0 indicates success and you can start issuing fops right away. -1 is > definitive failure. When ret is positive, it means initialization could not > complete, but glfs_t is still retrying to connect to the server and can > succeed in the future (for e.g, if you 'gluster volume start' the volume). > > I do understand that it is currently pointless as there is no way to get > notified of asynchronous success, but it is part of the asynchronous > initialization (glfs_init_async you can see in glfs.c) which will be > supported in the future. Ok, I see your point. So ret=1 makes sense for async init call only. But I think glfs_init should still return -1 in this particular case. If that's not possible, could you please document the additional return value of 1 in glfs.h so that users can optionally treat that as failure ? Regards, Bharata.