osd: used fixed size types for fiemap/mapext/sparseread encoding

The client expects <uint64_t,uint64_t>, so this breaks on any 32-bit osd.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil 2011-05-06 13:42:23 -07:00
parent dc9be20006
commit 48d94f6e34
2 changed files with 4 additions and 4 deletions

View File

@ -2198,7 +2198,7 @@ int FileStore::fiemap(coll_t cid, const sobject_t& oid,
{
if (!ioctl_fiemap) {
map<off_t, size_t> m;
map<uint64_t, uint64_t> m;
m[offset] = len;
::encode(m, bl);
return 0;
@ -2207,7 +2207,7 @@ int FileStore::fiemap(coll_t cid, const sobject_t& oid,
char fn[PATH_MAX];
struct fiemap *fiemap = NULL;
map<off_t, size_t> extmap;
map<uint64_t, uint64_t> extmap;
get_coname(cid, oid, fn, sizeof(fn));

View File

@ -1142,10 +1142,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
result = r;
break;
}
map<off_t, size_t> m;
map<uint64_t, uint64_t> m;
bufferlist::iterator iter = bl.begin();
::decode(m, iter);
map<off_t, size_t>::iterator miter;
map<uint64_t, uint64_t>::iterator miter;
bufferlist data_bl;
for (miter = m.begin(); miter != m.end(); ++miter) {
bufferlist tmpbl;