From patchwork Wed Jun 1 14:53:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 98204 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3F114B6F7D for ; Thu, 2 Jun 2011 00:56:04 +1000 (EST) Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRmng-0003Fg-En; Wed, 01 Jun 2011 14:53:36 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRmng-0005PL-1K; Wed, 01 Jun 2011 14:53:36 +0000 Received: from na3sys009aog110.obsmtp.com ([74.125.149.203]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRmnd-0005P2-2y for linux-mtd@lists.infradead.org; Wed, 01 Jun 2011 14:53:33 +0000 Received: from mail-qy0-f182.google.com ([209.85.216.182]) (using TLSv1) by na3sys009aob110.postini.com ([74.125.148.12]) with SMTP ID DSNKTeZSawyUwUv2ZErQJWIUNQsdITNOuTH4@postini.com; Wed, 01 Jun 2011 07:53:32 PDT Received: by qyk27 with SMTP id 27so3681463qyk.6 for ; Wed, 01 Jun 2011 07:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=8J5hc6/xXPr6sH5IjztxANiAvLCBZRKjOGmn0FXGpao=; b=eeh+E/Rni9FmlpGe1hrML7L4f5B62G5K01xfnxs2D2VHCs1/ORRCJdkh2yk3vzS8yK dbwssbYzzTFC6ba2LxM8THRTqREjIIXyIAjqijAoRqY29l5ogZaUJITli5EqJv/U7x2E 9ZdIj3OjUtIWAzjCoZC4zFP83W23C7TM1uuOY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=BDIyRJFQbqY+E1vLZRAQjW2h1KWY70nyaSECf1ZPmEKonMB5RRBhlD8f7jcFr4sSFw Qbf18CACC31v4qFPFObB77kJCw7UW4jvq768t881nlm4x2UZNHKBmwY2JgI4Apdys5vc qEfxHecexAm3tHbUKjEeAFs0fqlSMG01VexVQ= Received: by 10.224.76.74 with SMTP id b10mr5221131qak.339.1306940010347; Wed, 01 Jun 2011 07:53:30 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id m16sm714862qck.4.2011.06.01.07.53.29 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 07:53:29 -0700 (PDT) From: Ben Gardiner To: Artem Bityutskiy Subject: [PATCH] UBIFS: fixup merged 'UBIFS: fix-up free space earlier' Date: Wed, 1 Jun 2011 10:53:28 -0400 Message-Id: <1306940008-28454-1-git-send-email-bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1306923407.4405.94.camel@localhost> References: <1306923407.4405.94.camel@localhost> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110601_105333_379708_2974FA3C X-CRM114-Status: GOOD ( 15.24 ) X-Spam-Score: -2.4 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.203 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, "Matthew L. Creech" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org When the patch 'UBIFS: intialize LPT earlier' was massaged before being applied the context of the next patch 'UBIFS: fix-up free space earlier' was muddled sufficiently for the order of allocate-lpt then free-space-fixup was reversed -- I think. Put the free-space-fixup after allocate-lpt. Signed-off-by: Ben Gardiner --- With this fixup applied on-top-of the ubifs-2.6 master I am able to mount a ubinized image containing a UBIFS volume which has the free-space-fixup flag set. No assertions are displayed. --- fs/ubifs/super.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 4722f31..70e8c92 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1284,12 +1284,6 @@ static int mount_ubifs(struct ubifs_info *c) init_constants_master(c); - if (!c->ro_mount && c->space_fixup) { - err = ubifs_fixup_free_space(c); - if (err) - goto out_infos; - } - if ((c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY)) != 0) { ubifs_msg("recovery needed"); c->need_recovery = 1; @@ -1305,6 +1299,12 @@ static int mount_ubifs(struct ubifs_info *c) if (err) goto out_master; + if (!c->ro_mount && c->space_fixup) { + err = ubifs_fixup_free_space(c); + if (err) + goto out_master; + } + if (!c->ro_mount) { /* * Set the "dirty" flag so that if we reboot uncleanly we