From patchwork Thu Nov 8 13:06:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dragos.tatulea@intel.com X-Patchwork-Id: 1715701 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3A0B13FCDF for ; Thu, 8 Nov 2012 13:10:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755520Ab2KHNDt (ORCPT ); Thu, 8 Nov 2012 08:03:49 -0500 Received: from mga01.intel.com ([192.55.52.88]:60814 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755592Ab2KHNDs (ORCPT ); Thu, 8 Nov 2012 08:03:48 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 08 Nov 2012 05:03:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,737,1344236400"; d="scan'208";a="244101989" Received: from dtatulea-pc (HELO dtatulea-pc.ger.corp.intel.com) ([10.237.104.90]) by fmsmga001.fm.intel.com with ESMTP; 08 Nov 2012 05:03:28 -0800 From: dragos.tatulea@intel.com To: linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, cjb@laptop.org Cc: kirill.shutemov@linux.intel.com, irina.tirdea@intel.com, octavian.purdila@intel.com, tony.luck@intel.com, keescook@chromium.org, dragos.tatulea@gmail.com, Adrian Hunter Subject: [PATCH v2 03/26] pstore: add flush Date: Thu, 8 Nov 2012 15:06:01 +0200 Message-Id: <1352379984-18381-4-git-send-email-dragos.tatulea@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352379984-18381-1-git-send-email-dragos.tatulea@intel.com> References: <1352379984-18381-1-git-send-email-dragos.tatulea@intel.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Adrian Hunter Let the back end know when writing has finished by adding a flush method. Signed-off-by: Adrian Hunter Signed-off-by: Irina Tirdea --- fs/pstore/platform.c | 3 +++ include/linux/pstore.h | 1 + 2 files changed, 4 insertions(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index b9ab942..97ae8a9 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -114,6 +114,9 @@ static void pstore_dump(struct kmsg_dumper *dumper, why = get_reason_str(reason); + if (psinfo->flush) + psinfo->flush(psinfo); + if (in_nmi()) { is_locked = spin_trylock(&psinfo->buf_lock); if (!is_locked) diff --git a/include/linux/pstore.h b/include/linux/pstore.h index 27f1995..3f93b4a 100644 --- a/include/linux/pstore.h +++ b/include/linux/pstore.h @@ -68,6 +68,7 @@ struct pstore_info { struct pstore_info *psi); int (*erase)(enum pstore_type_id type, u64 id, struct pstore_info *psi); + int (*flush)(struct pstore_info *psi); void *data; };