summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorKiyoshi Ueda <k-ueda@ct.jp.nec.com>2009-12-10 23:52:27 +0000
committerAlasdair G Kergon <agk@redhat.com>2009-12-10 23:52:27 +0000
commit64dbce580d5a7e89e8de20b91f80c7267cdad91d (patch)
tree9d8a8bb8afd9d7b856d90abd7c5c35137547d09a /drivers/md/dm.c
parent4f186f8bbfa92bf1a2b39f7a8674348bfdba9437 (diff)
downloadop-kernel-dev-64dbce580d5a7e89e8de20b91f80c7267cdad91d.zip
op-kernel-dev-64dbce580d5a7e89e8de20b91f80c7267cdad91d.tar.gz
dm: export suspended state to targets
This patch adds the exported dm_suspended() function so that targets can check whether or not they are suspended. Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com> Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: Mike Anderson <andmike@linux.vnet.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index e0702bf..3167480 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2684,6 +2684,17 @@ int dm_suspended_md(struct mapped_device *md)
return test_bit(DMF_SUSPENDED, &md->flags);
}
+int dm_suspended(struct dm_target *ti)
+{
+ struct mapped_device *md = dm_table_get_md(ti->table);
+ int r = dm_suspended_md(md);
+
+ dm_put(md);
+
+ return r;
+}
+EXPORT_SYMBOL_GPL(dm_suspended);
+
int dm_noflush_suspending(struct dm_target *ti)
{
struct mapped_device *md = dm_table_get_md(ti->table);
OpenPOWER on IntegriCloud