Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755408AbbFULWE (ORCPT ); Sun, 21 Jun 2015 07:22:04 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:35302 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754243AbbFULVk (ORCPT ); Sun, 21 Jun 2015 07:21:40 -0400 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Alasdair Kergon , Mike Snitzer , Neil Brown , "Rafael J. Wysocki" , Len Brown , Pavel Machek Cc: dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 2/3] dm: Export function dm_suspend_md() Date: Sun, 21 Jun 2015 13:20:33 +0200 Message-Id: <1434885634-19895-3-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1434885634-19895-1-git-send-email-pali.rohar@gmail.com> References: <1428254419-7334-1-git-send-email-pali.rohar@gmail.com> <1434885634-19895-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1364 Lines: 48 This patch exports function dm_suspend_md() which suspend mapped device so other kernel drivers can use it and could suspend mapped device when needed. Signed-off-by: Pali Rohár --- drivers/md/dm.c | 6 ++++++ drivers/md/dm.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 2caf492..03298ff 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -3343,6 +3343,12 @@ out: return r; } +int dm_suspend_md(struct mapped_device *md) +{ + return dm_suspend(md, DM_SUSPEND_LOCKFS_FLAG); +} +EXPORT_SYMBOL_GPL(dm_suspend_md); + /* * Internal suspend/resume works like userspace-driven suspend. It waits * until all bios finish and prevents issuing new bios to the target drivers. diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 6123c2b..528e5e0 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -151,6 +151,11 @@ int dm_test_deferred_remove_flag(struct mapped_device *md); void dm_deferred_remove(void); /* + * Suspend mapped_device + */ +int dm_suspend_md(struct mapped_device *md); + +/* * The device-mapper can be driven through one of two interfaces; * ioctl or filesystem, depending which patch you have applied. */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/