gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] Incorrect return values from glfs_init()


From: Bharata B Rao
Subject: Re: [Gluster-devel] Incorrect return values from glfs_init()
Date: Thu, 26 Jul 2012 13:18:01 +0530

On Thu, Jul 26, 2012 at 12:14 PM, Anand Avati <address@hidden> 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.



reply via email to

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