Add a dm_table accessor function to check if md is being deleted. Signed-off-by: Mike Anderson <andmike@xxxxxxxxxxxxxxxxxx> --- 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. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel