aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-log-writes.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-log-writes.c
parentdm: fix dropped return code from dm_get_bdev_for_ioctl (diff)
downloadlinux-dev-1eb5fa849f2bf9186a618e85bea23f02e527540a.tar.xz
linux-dev-1eb5fa849f2bf9186a618e85bea23f02e527540a.zip
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-log-writes.c')
-rw-r--r--drivers/md/dm-log-writes.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
index 3362d866793b..e4c015dfef43 100644
--- a/drivers/md/dm-log-writes.c
+++ b/drivers/md/dm-log-writes.c
@@ -887,7 +887,8 @@ static int log_writes_iterate_devices(struct dm_target *ti,
* Messages supported:
* mark <mark data> - specify the marked data.
*/
-static int log_writes_message(struct dm_target *ti, unsigned argc, char **argv)
+static int log_writes_message(struct dm_target *ti, unsigned argc, char **argv,
+ char *result, unsigned maxlen)
{
int r = -EINVAL;
struct log_writes_c *lc = ti->private;