From patchwork Tue May 22 14:17:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 8873 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id BA0BA23F0A for ; Tue, 22 May 2012 14:20:07 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 8A95FA18C20 for ; Tue, 22 May 2012 14:20:07 +0000 (UTC) Received: by ggnf1 with SMTP id f1so6684516ggn.11 for ; Tue, 22 May 2012 07:20:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=SBLEbNfUx7qU8ZnxC/Qr0otPFIVr9s7YRVhTETwtPmc=; b=n5CVK9Q2K0/Uq/Az3++k579UEHMlbpiVZTAtz4lgoqQdnmO+dwGwudCrdUlyuEoFSK 3G97YqxVM7EwF147LzOHcN6sWB1o0+m6YS5UZEB1lm+NuGOq8kNzkBXdcxW0yeGxwdeX z2T6mbrHK8C12zCDutrKrjukL97JKBjT1p/UXkvFPLrfRJ0aowFEKMk08DvdhowIcyLJ HMkt3AsNX6/7W8VBA9xgxPWy4rJVAGKHC26qQ/XcgJ1dGLO59R2jkx8rTVPxbvTlUFun AZB8mCWnlzDKKThg2ohiPUtJ19CsIb6yY9pHzEVrAWJsXrHuL9w1V8kRqKaBCfbQgKTy e5vw== Received: by 10.50.222.202 with SMTP id qo10mr9879204igc.0.1337696406884; Tue, 22 May 2012 07:20:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp369491ibd; Tue, 22 May 2012 07:20:06 -0700 (PDT) Received: by 10.50.149.225 with SMTP id ud1mr9766485igb.74.1337696406354; Tue, 22 May 2012 07:20:06 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id t9si31663461pbj.12.2012.05.22.07.20.06 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:06 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.50 is neither permitted nor denied by best guess record for domain of anton.vorontsov@linaro.org) smtp.mail=anton.vorontsov@linaro.org Received: by mail-pz0-f50.google.com with SMTP id h15so9932040dan.37 for ; Tue, 22 May 2012 07:20:06 -0700 (PDT) Received: by 10.68.223.167 with SMTP id qv7mr80163079pbc.127.1337696405852; Tue, 22 May 2012 07:20:05 -0700 (PDT) Received: from localhost (c-71-204-165-222.hsd1.ca.comcast.net. [71.204.165.222]) by mx.google.com with ESMTPS id wo8sm26873733pbc.9.2012.05.22.07.20.03 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 May 2012 07:20:04 -0700 (PDT) From: Anton Vorontsov To: Greg Kroah-Hartman , Kees Cook , Colin Cross , Tony Luck Cc: Arnd Bergmann , John Stultz , Shuah Khan , arve@android.com, Rebecca Schultz Zavin , Jesper Juhl , Randy Dunlap , Stephen Boyd , Thomas Meyer , Andrew Morton , Marco Stornelli , WANG Cong , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-kernel@lists.linaro.org, patches@linaro.org, kernel-team@android.com Subject: [PATCH 03/16] pstore/ram_core: Do not reset restored zone's position and size Date: Tue, 22 May 2012 07:17:46 -0700 Message-Id: <1337696279-8994-3-git-send-email-anton.vorontsov@linaro.org> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <20120522141717.GA31574@lizard> References: <20120522141717.GA31574@lizard> X-Gm-Message-State: ALoCoQnNOGHyPt7NYYqcjJCch01/Oue4sENe9pGKBn4WEnlp04DI0w/zaAOHxAgCAtcaRYvdAOgs Otherwise, the files will survive just one reboot, and on a subsequent boot they will disappear. Also, as noticed by Colin Cross, this also causes an interesting behavior change in the console logging. Before this change, the console log would show only the messages from the last reboot. After this change, the console log will have logs from multiple boots appended to each other. Now to get the only most recent messages we can do: tac ramoops-console | sed '/^Linux version.*(.*@.*)/ q' | tac Signed-off-by: Anton Vorontsov --- fs/pstore/ram_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/ram_core.c b/fs/pstore/ram_core.c index 235513c..f6650d1 100644 --- a/fs/pstore/ram_core.c +++ b/fs/pstore/ram_core.c @@ -406,6 +406,7 @@ static int __init persistent_ram_post_init(struct persistent_ram_zone *prz, bool " size %zu, start %zu\n", buffer_size(prz), buffer_start(prz)); persistent_ram_save_old(prz); + return 0; } } else { pr_info("persistent_ram: no valid data in buffer"