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. -Noah -- 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