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 2/3] dm: Add accessor dm_table_md_deleting
Date: Fri, 13 Nov 2009 00:04:33 -0800	[thread overview]
Message-ID: <20091113080433.17412.48559.stgit@localhost.localdomain> (raw)
In-Reply-To: <20091113080422.17412.49305.stgit@localhost.localdomain>

Add a dm_table accessor function to check if md is being deleted.

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 6616598..fdf86fe 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1250,6 +1250,11 @@ int dm_table_md_suspended(struct dm_table *t)
 	return dm_suspended(t->md);
 }
 
+int dm_table_md_deleting(struct dm_table *t)
+{
+	return dm_deleting(t->md);
+}
+
 EXPORT_SYMBOL(dm_vcalloc);
 EXPORT_SYMBOL(dm_get_device);
 EXPORT_SYMBOL(dm_put_device);
@@ -1261,3 +1266,4 @@ EXPORT_SYMBOL(dm_table_put);
 EXPORT_SYMBOL(dm_table_get);
 EXPORT_SYMBOL(dm_table_unplug_all);
 EXPORT_SYMBOL(dm_table_md_suspended);
+EXPORT_SYMBOL(dm_table_md_deleting);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 16cd291..5a0fb6c 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -289,6 +289,7 @@ 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);
+int dm_table_md_deleting(struct dm_table *t);
 
 /*
  * Trigger an event.

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13  8:04 [PATCH 0/3] Add deleting state check for target messages Mike Anderson
2009-11-13  8:04 ` [PATCH 1/3] dm: Add dm_deleting accesor function Mike Anderson
2009-11-13  8:04 ` Mike Anderson [this message]
2009-11-13  8:04 ` [PATCH 3/3] dm: Add deleting check to target_message Mike Anderson
2009-11-13 18:32   ` malahal
2009-11-16  2:14 ` [PATCH 0/3] Add deleting state check for target messages Kiyoshi Ueda
2009-11-16  7:38   ` Mike Anderson
2009-11-16 15:00     ` 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=20091113080433.17412.48559.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.