Intenrally allocate 2x the raw listxattr result; tell the user the same.
Signed-off-by: Sage Weil <sage@inktank.com>
int r;
if (!len)
- return ::ceph_os_listxattr(fn, names, len);
+ return ::ceph_os_listxattr(fn, names, len) * 2;
r = ::ceph_os_listxattr(fn, 0, 0);
if (r < 0)
int r;
if (!len)
- return ::ceph_os_flistxattr(fd, names, len);
+ return ::ceph_os_flistxattr(fd, names, len) * 2;
r = ::ceph_os_flistxattr(fd, 0, 0);
if (r < 0)