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

Add dm_deleting accesor function to allow checking of the DMF_DELETING bit.

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

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 724efc6..96127cc 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2604,6 +2604,11 @@ int dm_suspended(struct mapped_device *md)
 	return test_bit(DMF_SUSPENDED, &md->flags);
 }
 
+int dm_deleting(struct mapped_device *md)
+{
+	return test_bit(DMF_DELETING, &md->flags);
+}
+
 int dm_noflush_suspending(struct dm_target *ti)
 {
 	struct mapped_device *md = dm_table_get_md(ti->table);
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 3440c54..16cd291 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -236,6 +236,7 @@ const char *dm_device_name(struct mapped_device *md);
 int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
 struct gendisk *dm_disk(struct mapped_device *md);
 int dm_suspended(struct mapped_device *md);
+int dm_deleting(struct mapped_device *md);
 int dm_noflush_suspending(struct dm_target *ti);
 union map_info *dm_get_mapinfo(struct bio *bio);
 union map_info *dm_get_rq_mapinfo(struct request *rq);

  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 ` Mike Anderson [this message]
2009-11-13  8:04 ` [PATCH 2/3] dm: Add accessor dm_table_md_deleting Mike Anderson
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=20091113080427.17412.41405.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.