From: Sage Weil Date: Wed, 23 Oct 2013 02:39:51 +0000 (-0700) Subject: os/FileStore: fix getattr return value when using omap X-Git-Tag: v0.72-rc1~14^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d2b661d0efe79f5ec96e64647350cee0b80dc887;p=ceph.git os/FileStore: fix getattr return value when using omap The return value should be the length of the value, even when it was stored in omap. Signed-off-by: Sage Weil --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 6940dff14056..ffac501aaf20 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -3424,7 +3424,7 @@ int FileStore::getattr(coll_t cid, const ghobject_t& oid, const char *name, buff } bp = bufferptr(got.begin()->second.c_str(), got.begin()->second.length()); - r = 0; + r = bp.length(); } out: dout(10) << "getattr " << cid << "/" << oid << " '" << name << "' = " << r << dendl;