Re: [patch RFC] client: return stripe address replicas

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

 



On Tue, 8 Nov 2011, Noah Watkins wrote:
> ----- Original Message -----
> > From: "Tommi Virtanen" <tommi.virtanen@xxxxxxxxxxxxx>
> > 
> > The value in returning the number that *would have been written* is in
> > that now the caller can reallocate a buffer of exactly the right size
> > (barring races). Like snprintf() and friends. With just a generic
> > -ENOBUFS/-EMSGSIZE/whatever you cram in there, the caller must do a
> > series of increasing guesses.
> > 
> 
> Thanks for the feedback. I ended up using -ERANGE, and allow naddr=0 for 
> querying the actual size.

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.

Does it matter?

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