Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
drivers/md/dm-thin.c
··· 3656 3656 if (get_pool_mode(pool) >= PM_READ_ONLY) { 3657 3657 DMERR("%s: unable to service pool target messages in READ_ONLY or FAIL mode", 3658 3658 dm_device_name(pool->pool_md)); 3659 - return -EINVAL; 3659 + return -EOPNOTSUPP; 3660 3660 } 3661 3661 3662 3662 if (!strcasecmp(argv[0], "create_thin"))