On Wed, Nov 9, 2011 at 12:56, Sage Weil <sage@xxxxxxxxxxxx> wrote: > The only issue with this is that, in the event that you don't guess a > sufficiently large array on the first call, you may need to call again, > and in some cases that may mean multiple MDS requests. Normally that's > not the case. And a smart caller should guess 4 and only pass 0 and then > N if 4 failed. But a naive caller will always make two calls, first with > 0 and then with N, and in some cases that's actually slower. That's the biggest benefit of the "return number that would be returned" or "int *naddr_out" approaches; if you didn't allocate enough, you get told how much to allocate. No need to 1. try with too small 2. probe for size 3. try with right size. -- 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