From d2b661d0efe79f5ec96e64647350cee0b80dc887 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 22 Oct 2013 19:39:51 -0700 Subject: [PATCH] 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 --- src/os/FileStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 6940dff1405..ffac501aaf2 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; -- 2.47.3