From patchwork Thu Mar 10 09:19:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henry Chang X-Patchwork-Id: 623901 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2A9JBSW003907 for ; Thu, 10 Mar 2011 09:21:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752433Ab1CJJT6 (ORCPT ); Thu, 10 Mar 2011 04:19:58 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:54125 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752390Ab1CJJT4 (ORCPT ); Thu, 10 Mar 2011 04:19:56 -0500 Received: by gyh20 with SMTP id 20so566724gyh.19 for ; Thu, 10 Mar 2011 01:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=NIsf+7nX1fKTBE6JIeQYhPMcLiArN2OqjUOTUeT1v20=; b=YnUpWdKEcJjNuTn4p135X2odIogZKk8EI5fQmEuaMRYLaWQaM2puu3d5aYtsudvhMi +VkT6/3Vwn7coU4cgbMBb5uwn1i/wQjc1LndrVblDe2YYFCQ7mkA5dbVyOftaMXkQ0KI ojYBUaXwTURZjAOh1aoFceF3dZObLgT+Y1VTw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IrTdYJ4T8gIQUIyTuoYKBWVQ5ET5eOVKzmyJ/rRHvEDrQzY6VhegQei8quRoxbCCjW +bvr+U8NZ28W7iEUNy5Fj99AP4u8vag/vWjZxiUoQgoT5PooXOx6bcZe9/Q9SVM6UYt2 PcRQXIfAN/6SRYnEZUZE+BDyEy0xdjBNnKMT0= MIME-Version: 1.0 Received: by 10.101.11.29 with SMTP id o29mr3463649ani.97.1299748795357; Thu, 10 Mar 2011 01:19:55 -0800 (PST) Received: by 10.101.118.4 with HTTP; Thu, 10 Mar 2011 01:19:55 -0800 (PST) Date: Thu, 10 Mar 2011 17:19:55 +0800 Message-ID: Subject: Question about PG::merge_log From: Henry Chang To: ceph-devel@vger.kernel.org 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 (demeter1.kernel.org [140.211.167.41]); Thu, 10 Mar 2011 09:21:54 +0000 (UTC) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 2778591..671a37d 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -351,7 +351,8 @@ void PG::merge_log(ObjectStore::Transaction& t, if (p->version <= log.head) { dout(10) << "merge_log split point is " << *p << dendl; - if (p->version == log.head) + if (old_objects.find(p->soid) != old_objects.end() && + old_objects[p->soid]->version == p->version) p++; // move past the split point, if it also exists in our old log... break;