From patchwork Tue Apr 12 15:21:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 701141 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 p3CFLFoj022183 for ; Tue, 12 Apr 2011 15:21:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756376Ab1DLPVO (ORCPT ); Tue, 12 Apr 2011 11:21:14 -0400 Received: from lsd-gw.ic.unicamp.br ([143.106.7.165]:55050 "EHLO boneca.lsd.ic.unicamp.br" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756321Ab1DLPVN (ORCPT ); Tue, 12 Apr 2011 11:21:13 -0400 Received: from freie.oliva.athome.lsd.ic.unicamp.br (gw-to-emilia.oliva.athome.lsd.ic.unicamp.br [172.31.160.17] (may be forged)) by boneca.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p3CFLAGq020283 for ; Tue, 12 Apr 2011 12:21:11 -0300 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id p3CFLAWK024262 for ; Tue, 12 Apr 2011 12:21:10 -0300 Received: from livre.localdomain (aoliva@localhost.localdomain [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p3CFL9DE030246; Tue, 12 Apr 2011 12:21:09 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p3CFL8Q3030244; Tue, 12 Apr 2011 12:21:08 -0300 X-Authentication-Warning: livre.localdomain: aoliva set sender to oliva@lsd.ic.unicamp.br using -f From: Alexandre Oliva To: ceph-devel@vger.kernel.org Subject: [PATCH] Relax journal trim_finish assertion to pass when (to == trimmed_pos). Organization: Free thinker, not speaking for University of Campinas Date: Tue, 12 Apr 2011 12:21:08 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) 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 (demeter1.kernel.org [140.211.167.41]); Tue, 12 Apr 2011 15:21:15 +0000 (UTC) I'm getting relatively frequent MDS crashes. I believe this happens as a replay-standby node is about to take over once the MDS it follows is restarted, most often because it stopped making progress for a long time. In the core files I checked, waitfor_trim was empty, so this shouldn't have ill effects. Since I'm not sure how to trigger this particular assertion failure, I can't say that I've tested this patch thoroughly, but unless the purpose of the assertion is to catch the == case, I think it's safe to put it in. --- Relax journal trim_finish assertion to pass when (to == trimmed_pos). Signed-off-by: Alexandre Oliva --- src/osdc/Journaler.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/osdc/Journaler.cc b/src/osdc/Journaler.cc index f3241c4..4f4811c 100644 --- a/src/osdc/Journaler.cc +++ b/src/osdc/Journaler.cc @@ -960,7 +960,7 @@ void Journaler::_trim_finish(int r, uint64_t to) assert(r >= 0); assert(to <= trimming_pos); - assert(to > trimmed_pos); + assert(to >= trimmed_pos); trimmed_pos = to; // finishers?