[dm-devel] [PATCH 1/3] dm: Add dm_deleting accesor function

Mike Anderson andmike at linux.vnet.ibm.com
Fri Nov 13 08:04:28 UTC 2009


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

Signed-off-by: Mike Anderson <andmike at 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);




More information about the dm-devel mailing list