The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Alasdair Kergon <agk@redhat.com>
Cc: Kees Cook <keescook@chromium.org>,
	Mike Snitzer <snitzer@redhat.com>,
	dm-devel@redhat.com, Jonathan Corbet <corbet@lwn.net>,
	Shaohua Li <shli@kernel.org>,
	Dan Ehrenberg <dehrenberg@chromium.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Chen Yu <yu.c.chen@intel.com>,
	Vishnu Pratap Singh <vishnu.ps@samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yaowei Bai <baiyaowei@cmss.chinamobile.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-raid@vger.kernel.org, Will Drewry <wad@chromium.org>,
	David Zeuthen <zeuthen@google.com>
Subject: [PATCH v5 2/3] dm: make mapped_device locking functions available
Date: Sat, 20 Feb 2016 10:13:51 -0800	[thread overview]
Message-ID: <1455992032-14594-3-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1455992032-14594-1-git-send-email-keescook@chromium.org>

For init to build a mapped_device, it must hold the appropriate locks,
so move these to the common header.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
v5: first version of this specific patch in the series
---
 drivers/md/dm.h               | 2 --
 include/linux/device-mapper.h | 6 ++++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index 7edcf97dfa5a..f21700431f67 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -78,8 +78,6 @@ bool dm_table_mq_request_based(struct dm_table *t);
 void dm_table_free_md_mempools(struct dm_table *t);
 struct dm_md_mempools *dm_table_get_md_mempools(struct dm_table *t);
 
-void dm_lock_md_type(struct mapped_device *md);
-void dm_unlock_md_type(struct mapped_device *md);
 void dm_set_md_type(struct mapped_device *md, unsigned type);
 unsigned dm_get_md_type(struct mapped_device *md);
 struct target_type *dm_get_immutable_target_type(struct mapped_device *md);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 87afa0552398..48df518345fd 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -414,6 +414,12 @@ union map_info *dm_get_rq_mapinfo(struct request *rq);
 struct queue_limits *dm_get_queue_limits(struct mapped_device *md);
 
 /*
+ * Lock functions.
+ */
+void dm_lock_md_type(struct mapped_device *md);
+void dm_unlock_md_type(struct mapped_device *md);
+
+/*
  * Geometry functions.
  */
 int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
-- 
2.6.3

  parent reply	other threads:[~2016-02-20 18:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-20 18:13 [PATCH v5 0/3] init: add support to directly boot to a mapped device Kees Cook
2016-02-20 18:13 ` [PATCH v5 1/3] dm: export a table+mapped device to the ioctl interface Kees Cook
2016-02-20 18:13 ` Kees Cook [this message]
2016-02-20 18:13 ` [PATCH v5 3/3] init: add support to directly boot to a mapped device Kees Cook
2016-02-21 22:08 ` [PATCH v5 0/3] " Alasdair G Kergon
2016-02-22 18:55   ` Kees Cook
2016-02-26 16:53     ` Mike Snitzer
2016-02-26 18:52       ` Kees Cook
2016-02-26 19:21         ` Mike Snitzer
2016-02-26 19:59           ` Kees Cook
2016-02-26 20:47             ` Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455992032-14594-3-git-send-email-keescook@chromium.org \
    --to=keescook@chromium.org \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=corbet@lwn.net \
    --cc=dehrenberg@chromium.org \
    --cc=dm-devel@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=shli@kernel.org \
    --cc=snitzer@redhat.com \
    --cc=vishnu.ps@samsung.com \
    --cc=wad@chromium.org \
    --cc=yu.c.chen@intel.com \
    --cc=zeuthen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox