summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-ioctl.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-ioctl.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-ioctl.c')
-rw-r--r--drivers/md/dm-ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index a89fd8f44453..5acf77de5945 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1595,7 +1595,7 @@ static int target_message(struct file *filp, struct dm_ioctl *param, size_t para
1595 DMWARN("Target message sector outside device."); 1595 DMWARN("Target message sector outside device.");
1596 r = -EINVAL; 1596 r = -EINVAL;
1597 } else if (ti->type->message) 1597 } else if (ti->type->message)
1598 r = ti->type->message(ti, argc, argv); 1598 r = ti->type->message(ti, argc, argv, result, maxlen);
1599 else { 1599 else {
1600 DMWARN("Target type does not support messages"); 1600 DMWARN("Target type does not support messages");
1601 r = -EINVAL; 1601 r = -EINVAL;