Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1621418

[PATCH 2/5] dm: move dm definitions outside the private header to boot dm targets.

From Enric Balletbo i Serra <enric.balletbo@collabora.com>
Newsgroups linux.kernel
Subject [PATCH 2/5] dm: move dm definitions outside the private header to boot dm targets.
Date 2017-04-11 17:40 +0200
Message-ID <tv63E-nH-19@gated-at.bofh.it> (permalink)
References <tv63D-nH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


To boot to device-mapper targets without an initr* we should be able to
use some dm functions, move these to the device-mapper include file so
we can call these functions from init/*

The functions moved are:

  dm_table_get_type()
  dm_lock_md_type()
  dm_unlock_md_type()
  dm_set_md_type()
  dm_get_md_type()
  dm_setup_md_queue()

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
 drivers/md/dm.h               | 7 -------
 include/linux/device-mapper.h | 8 ++++++++
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index c54d2f1..6b501b5 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -63,7 +63,6 @@ void dm_table_presuspend_undo_targets(struct dm_table *t);
 void dm_table_postsuspend_targets(struct dm_table *t);
 int dm_table_resume_targets(struct dm_table *t);
 int dm_table_any_congested(struct dm_table *t, int bdi_bits);
-unsigned dm_table_get_type(struct dm_table *t);
 struct target_type *dm_table_get_immutable_target_type(struct dm_table *t);
 struct dm_target *dm_table_get_immutable_target(struct dm_table *t);
 struct dm_target *dm_table_get_wildcard_target(struct dm_table *t);
@@ -73,14 +72,8 @@ bool dm_table_all_blk_mq_devices(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);
 
-int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t);
-
 /*
  * To check the return value from dm_table_find_target().
  */
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 70cb6af..013ac2e 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -513,6 +513,14 @@ void dm_table_run_md_queue_async(struct dm_table *t);
 struct dm_table *dm_swap_table(struct mapped_device *md,
 			       struct dm_table *t);
 
+unsigned dm_table_get_type(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);
+int dm_setup_md_queue(struct mapped_device *md, struct dm_table *t);
+
 /*
  * A wrapper around vmalloc.
  */
-- 
2.9.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] dm: boot a mapped device without an initramfs Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
  [PATCH 1/5] dm: move dm_table_destroy() to same header as dm_table_create() Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
  [PATCH 5/5] dm verity: add support for version 0 of the on-disk format Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
    Re: [PATCH 5/5] dm verity: add support for version 0 of the on-disk  format Milan Broz <gmazyland@gmail.com> - 2017-04-11 19:30 +0200
      Re: [PATCH 5/5] dm verity: add support for version 0 of the on-disk  format Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 21:50 +0200
  [PATCH 2/5] dm: move dm definitions outside the private header to boot dm targets. Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
  [PATCH 3/5] dm: export a table+mapped device to the ioctl interface Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
  [PATCH 4/5] init: add support to directly boot to a mapped device Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-04-11 17:40 +0200
    Re: [PATCH 4/5] init: add support to directly boot to a mapped device kbuild test robot <lkp@intel.com> - 2017-04-12 02:10 +0200

csiph-web