Bogus error when attempting to set property on read-only pool
When attempting to set a property on a read-only pool the zfs command exits with "internal error: out of memory". This happens because in the case of a read-only pool the error list is not filled, which causes the call to nvlist_unpack() in zcmd_read_dst_nvlist() to fail with "ENOTSUP". The code wrongly assumes that the only way nvlist_unpack() can fail is with ENOMEM and calls no_memory() which prints the bogus error and exits.
Updated by Electric Monk about 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit f62db44dbcda5dd786bb821f1e6fd3ca2e6d4391 Author: Andrew Stormont <email@example.com> Date: 2018-09-18T20:48:05.000Z 9616 Bogus error when attempting to set property on read-only pool Reviewed by: Paul Dagnelie <firstname.lastname@example.org> Reviewed by: Matt Ahrens <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>