From patchwork Fri May 6 20:28:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sage Weil X-Patchwork-Id: 763122 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p46KRupZ027363 for ; Fri, 6 May 2011 20:27:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756575Ab1EFU1z (ORCPT ); Fri, 6 May 2011 16:27:55 -0400 Received: from cobra.newdream.net ([66.33.216.30]:48226 "EHLO cobra.newdream.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756570Ab1EFU1z (ORCPT ); Fri, 6 May 2011 16:27:55 -0400 Received: from cobra.newdream.net (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id AA44EBC72C; Fri, 6 May 2011 13:28:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=newdream.net; h=date:from:to:cc :subject:in-reply-to:message-id:references:mime-version: content-type; q=dns; s=newdream.net; b=IWoeEbxj1PZXC0bg/SvNcbTaU gxrnt3Ml38cIcAdTcCVnC76kBflX3oiPUaF3N+6VX9A8dXHDUXUzzAGFCfwfljN1 aTk549Q3XwHmVP0KVBj/sA/89GgzQyv17aVCiJWu+0ioG4Pe0W4vCfwuFckJCQoH zr0sLL416lJzQzJwxU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=newdream.net; h=date:from :to:cc:subject:in-reply-to:message-id:references:mime-version: content-type; s=newdream.net; bh=EuujyEIggfjNVhhWDQPDWkfSSBE=; b=cyFbuvAtlQeTFmF5pB+CHrrKvbo/8wUFpk88NWLegMYZ+ZP5x0xt0YPXGdi/4 RHhCS5nYf5Tpar+mqVeRBbFP7lcbdd3iXLt6kRpxuEPF+ryb+kdI17jnnIRsNWjf qchO2b3++JB7DM/IiKQR+U//hldZqgVza8iAsjgqNht560= Received: by cobra.newdream.net (Postfix, from userid 1031) id 92F0FBC81E; Fri, 6 May 2011 13:28:32 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by cobra.newdream.net (Postfix) with ESMTP id 782D8BC72C; Fri, 6 May 2011 13:28:32 -0700 (PDT) Date: Fri, 6 May 2011 13:28:32 -0700 (PDT) From: Sage Weil To: Dyweni - Qemu-Devel <8SScqsnYX8tr@dyweni.com> cc: ceph-devel@vger.kernel.org, Josh Durgin , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] Qemu + RBD = ceph::buffer::end_of_buffer In-Reply-To: Message-ID: References: <346055bf24b9f7eabcfafa1cc53a4f66.squirrel@localhost> <4DC45149.8020101@dreamhost.com> <984ed3487d4f68b72f4b0720d3caf27e.squirrel@localhost> <04a5fc1fcc55ce2fd9d913ca2ae449ed.squirrel@localhost> MIME-Version: 1.0 Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 06 May 2011 20:27:58 +0000 (UTC) On Fri, 6 May 2011, Dyweni - Qemu-Devel wrote: > Hi Sage/Lists! > > Yes! The entire Ceph cluster (1 Mon, 1 MSD, 3 OSD) are 32bit linux. > > The machine running Qemu is 64bit linux. Excellent. This is now fixed by 48d94f6e34da8ace2b5cb128de1bcfb34b3c40b5 in the stable and master branches of ceph.git. Or you can apply the patch below. Thanks! sage From 48d94f6e34da8ace2b5cb128de1bcfb34b3c40b5 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 6 May 2011 13:42:23 -0700 Subject: [PATCH] osd: used fixed size types for fiemap/mapext/sparseread encoding The client expects , so this breaks on any 32-bit osd. Signed-off-by: Sage Weil --- src/os/FileStore.cc | 4 ++-- src/osd/ReplicatedPG.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 81bc91d..ca11435 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -2198,7 +2198,7 @@ int FileStore::fiemap(coll_t cid, const sobject_t& oid, { if (!ioctl_fiemap) { - map m; + map 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 extmap; + map extmap; get_coname(cid, oid, fn, sizeof(fn)); diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index ba76b05..84399ca 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1142,10 +1142,10 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector& ops, result = r; break; } - map m; + map m; bufferlist::iterator iter = bl.begin(); ::decode(m, iter); - map::iterator miter; + map::iterator miter; bufferlist data_bl; for (miter = m.begin(); miter != m.end(); ++miter) { bufferlist tmpbl;