diff options
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 09a57113955..c5f784419f2 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -1080,6 +1080,20 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits) | |||
1080 | return r; | 1080 | return r; |
1081 | } | 1081 | } |
1082 | 1082 | ||
1083 | int dm_table_any_busy_target(struct dm_table *t) | ||
1084 | { | ||
1085 | unsigned i; | ||
1086 | struct dm_target *ti; | ||
1087 | |||
1088 | for (i = 0; i < t->num_targets; i++) { | ||
1089 | ti = t->targets + i; | ||
1090 | if (ti->type->busy && ti->type->busy(ti)) | ||
1091 | return 1; | ||
1092 | } | ||
1093 | |||
1094 | return 0; | ||
1095 | } | ||
1096 | |||
1083 | void dm_table_unplug_all(struct dm_table *t) | 1097 | void dm_table_unplug_all(struct dm_table *t) |
1084 | { | 1098 | { |
1085 | struct dm_dev_internal *dd; | 1099 | struct dm_dev_internal *dd; |