summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-10-22 19:39:51 -0700
committerSage Weil <sage@inktank.com>2013-10-22 19:40:49 -0700
commit74942539bbe9cc6e9fae7bf0e93ba5d3d91349aa (patch)
treeab0fa8d3b1ac30b9327bf6b8678ffdb3a0157e71
parentcd3a35aac7b2fbc5080c780e855ab1afcdf98cdb (diff)
downloadceph-74942539bbe9cc6e9fae7bf0e93ba5d3d91349aa.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/os/FileStore.cc2
1 files changed, 1 insertions, 1 deletions
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;