summaryrefslogtreecommitdiff
path: root/drivers/md/dm-switch.c
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2018-02-28 15:59:59 -0500
committerMike Snitzer <snitzer@redhat.com>2018-04-03 15:04:10 -0400
commit1eb5fa849f2bf9186a618e85bea23f02e527540a (patch)
treeb0f5e85395f06f86e7db283155c5f73a5b942c8b /drivers/md/dm-switch.c
parentda5dadb4f11660ca67580cd4a7420161266d6254 (diff)
dm: allow targets to return output from messages they are sent
Could be useful for a target to return stats or other information. If a target does DMEMIT() anything to @result from its .message method then it must return 1 to the caller. Signed-off-By: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-switch.c')
-rw-r--r--drivers/md/dm-switch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-switch.c b/drivers/md/dm-switch.c
index 8d0ba879777e..8f9208c2d2e3 100644
--- a/drivers/md/dm-switch.c
+++ b/drivers/md/dm-switch.c
@@ -466,7 +466,8 @@ static int process_set_region_mappings(struct switch_ctx *sctx,
*
* Only set_region_mappings is supported.
*/
-static int switch_message(struct dm_target *ti, unsigned argc, char **argv)
+static int switch_message(struct dm_target *ti, unsigned argc, char **argv,
+ char *result, unsigned maxlen)
{
static DEFINE_MUTEX(message_mutex);