Re: [PATCH 1/4] client: return stripe address replicas

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

 



On Wed, 9 Nov 2011, Tommi Virtanen wrote:
> On Tue, Nov 8, 2011 at 18:39, Noah Watkins <jayhawk@xxxxxxxxxxx> wrote:
> > +  /* naddr == 0: drop through and return actual size */
> > +  if (naddr && (address.size() > (unsigned)naddr))
> 
> I have to say I'm not completely comfortable with the magicness of
> naddr==0, mostly because I haven't seen other APIs do it like that.

getxattr(2) and listxattr(2) are the ones I've seen:

"An empty buffer of size zero can be passed into these calls to return the 
current size of the list of extended attribute names, which can be used to 
estimate the size of a buffer which is sufficiently large to hold the list 
of names."


[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