From: Greg Farnum Date: Thu, 17 Oct 2013 22:14:40 +0000 (-0700) Subject: ObjectStore: add a bufferlist-based getattrs() function X-Git-Tag: v0.72-rc1~13^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=178f9a2a45a904eb348d0f710a239a1b7ba5a462;p=ceph.git ObjectStore: add a bufferlist-based getattrs() function Signed-off-by: Greg Farnum --- diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index baa35aa7e831..6494290b5411 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -905,6 +905,16 @@ public: return r; } virtual int getattrs(coll_t cid, const ghobject_t& oid, map& aset, bool user_only = false) {return 0;}; + int getattrs(coll_t cid, const ghobject_t& oid, map& aset, bool user_only = false) { + map bmap; + int r = getattrs(cid, oid, bmap, user_only); + for (map::iterator i = bmap.begin(); + i != bmap.end(); + ++i) { + aset[i->first].append(i->second); + } + return r; + } // collections