All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@linux.vnet.ibm.com>
To: dm-devel@redhat.com
Subject: [PATCH 1/2] dm: Add accessor dm_table_md_suspended
Date: Fri, 13 Nov 2009 00:06:42 -0800	[thread overview]
Message-ID: <20091113080642.17587.37581.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091113080637.17587.64935.stgit@localhost.localdomain>

Add a dm_table accessor function to check if md is suspended.

Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
---
 drivers/md/dm-table.c         |    6 ++++++
 include/linux/device-mapper.h |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 1a6cb3c..6616598 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1245,6 +1245,11 @@ struct mapped_device *dm_table_get_md(struct dm_table *t)
 	return t->md;
 }
 
+int dm_table_md_suspended(struct dm_table *t)
+{
+	return dm_suspended(t->md);
+}
+
 EXPORT_SYMBOL(dm_vcalloc);
 EXPORT_SYMBOL(dm_get_device);
 EXPORT_SYMBOL(dm_put_device);
@@ -1255,3 +1260,4 @@ EXPORT_SYMBOL(dm_table_get_md);
 EXPORT_SYMBOL(dm_table_put);
 EXPORT_SYMBOL(dm_table_get);
 EXPORT_SYMBOL(dm_table_unplug_all);
+EXPORT_SYMBOL(dm_table_md_suspended);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index df7607e..3440c54 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -287,6 +287,7 @@ sector_t dm_table_get_size(struct dm_table *t);
 unsigned int dm_table_get_num_targets(struct dm_table *t);
 fmode_t dm_table_get_mode(struct dm_table *t);
 struct mapped_device *dm_table_get_md(struct dm_table *t);
+int dm_table_md_suspended(struct dm_table *t);
 
 /*
  * Trigger an event.

  reply	other threads:[~2009-11-13  8:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  8:06 [PATCH 0/2] Add suspended state check for target messages Mike Anderson
2009-11-13  8:06 ` Mike Anderson [this message]
2009-11-13 14:19   ` [PATCH 1/2] dm: Add accessor dm_table_md_suspended Mike Snitzer
2009-11-13  8:06 ` [PATCH 2/2] dm: Add suspended check to multipath_message Mike Anderson
2009-11-13 18:35   ` malahal
2009-11-13 10:22 ` [PATCH 0/2] Add suspended state check for target messages Kiyoshi Ueda
2009-11-13 14:19   ` Alasdair G Kergon
2009-11-13 18:30     ` malahal
2009-11-13 18:47     ` Mike Anderson
2009-11-16  7:25     ` Kiyoshi Ueda
2009-11-16  7:43       ` Mike Anderson
2009-11-16 13:23       ` Alasdair G Kergon

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=20091113080642.17587.37581.stgit@localhost.localdomain \
    --to=andmike@linux.vnet.ibm.com \
    --cc=dm-devel@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.