Re: [PATCH] libcephfs: return error when not mounted

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

 



On Mon, 14 May 2012, Noah Watkins wrote:
> On May 14, 2012, at 10:03 AM, Tommi Virtanen wrote:
> > On Fri, May 11, 2012 at 6:21 PM, Noah Watkins <jayhawk@xxxxxxxxxxx> wrote:
> >> Return an error rather than a segfault if a client uses the interface
> >> when unmounted. The Java bindings were explicitly enforcing the
> >> mounted state, but this was overly complicated, uncommon, and better
> >> handled with a simple exception that can be checked at libcephfs level.
> > ...
> >> +  if (!cmount->is_mounted())
> >> +    return -EDOM;
> > 
> > Noah, this is not really about your patch, as existing code already
> > has return -EDOM, but... oh boy does the API abuse POSIX errors.
> > 
> > "Numerical argument out of domain".
> 
> :)  Yeh, i stared at errno.h for a while. Note that -EDOM is already 
> returned by mount() when it is already mounted.

Given the small number of libcephfs users, let's not be afraid to change 
it to something better.

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux