diff options
author | наб <[email protected]> | 2021-04-16 20:03:20 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-04-17 12:39:54 -0700 |
commit | a31ac10185e60f4806139e7c2b02afada12ecf03 (patch) | |
tree | 410ef5e5007a35b86fedc8c8327c648e2b284f8c /include/sys/bptree.h | |
parent | bfe8b9fff3888828d92db1baf0c9e5982fd45842 (diff) |
libzfs: refresh property cache after inheriting userprop
This matches what happens when inheriting a system property
Consider the following program:
int main() {
void *zhp = libzfs_init();
void *dataset = zfs_open(zhp, "zest/__test", 1);
printf("before:");
dump_nvlist(zfs_get_user_props(dataset), 2);
printf("\n");
zfs_prop_inherit(dataset, "xyz.nabijaczleweli:test", 0);
printf("after:");
dump_nvlist(zfs_get_user_props(dataset), 2);
printf("\n");
zfs_refresh_properties(dataset);
printf("refreshed:");
dump_nvlist(zfs_get_user_props(dataset), 2);
printf("\n");
}
And the output before:
# zfs set xyz.nabijaczleweli:test=hehe zest/__test
# ./a.out
before: xyz.nabijaczleweli:test:
value: 'hehe'
source: 'zest/__test'
after: xyz.nabijaczleweli:test:
value: 'hehe'
source: 'zest/__test'
refreshed:
As compared to the output after:
# zfs set xyz.nabijaczleweli:test=hehe zest/__test
# ./a.out
before: xyz.nabijaczleweli:test:
value: 'hehe'
source: 'zest/__test'
after:
refreshed:
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11064
Closes #11911
Diffstat (limited to 'include/sys/bptree.h')
0 files changed, 0 insertions, 0 deletions