diff options
author | Mike Snitzer <snitzer@redhat.com> | 2015-06-09 12:31:26 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-06-11 17:13:05 -0400 |
commit | fd467696e8beb542144cd005ff96cd35fff41354 (patch) | |
tree | 900aa4ce86274d0ad19f42331d41994a8be54ec8 /drivers/md | |
parent | 34fbcf6257eb3f39a5b78a4f51b40f881b82033b (diff) | |
download | op-kernel-dev-fd467696e8beb542144cd005ff96cd35fff41354.zip op-kernel-dev-fd467696e8beb542144cd005ff96cd35fff41354.tar.gz |
dm thin: fail messages with EOPNOTSUPP when pool cannot handle messages
Use EOPNOTSUPP, rather than EINVAL, error code when user attempts to
send the pool a message. Otherwise usespace is led to believe the
message failed due to invalid argument.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-thin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 99daf2e..c33f61a4 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -3656,7 +3656,7 @@ static int pool_message(struct dm_target *ti, unsigned argc, char **argv) if (get_pool_mode(pool) >= PM_READ_ONLY) { DMERR("%s: unable to service pool target messages in READ_ONLY or FAIL mode", dm_device_name(pool->pool_md)); - return -EINVAL; + return -EOPNOTSUPP; } if (!strcasecmp(argv[0], "create_thin")) |