-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs_prop_inherit() refreshes the stored values for native props, but not for user ones #11064
Labels
Status: Triage Needed
New issue which needs to be triaged
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
nabijaczleweli
added
Status: Triage Needed
New issue which needs to be triaged
Type: Defect
Incorrect behavior (e.g. crash, hang)
labels
Oct 14, 2020
nabijaczleweli
changed the title
zfs_prop_inherit() refreshes the stored values for native props, but not for user unes
zfs_prop_inherit() refreshes the stored values for native props, but not for user ones
Oct 14, 2020
A test-case that actually functions: int main(int argc, char **argv) {
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");
} with
|
nabijaczleweli
added a commit
to nabijaczleweli/zfs
that referenced
this issue
Apr 16, 2021
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: Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064
13 tasks
behlendorf
pushed a commit
to behlendorf/zfs
that referenced
this issue
Apr 21, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 6, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 6, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 6, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 7, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 10, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 10, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 10, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 13, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
ghost
pushed a commit
to truenas/zfs
that referenced
this issue
May 17, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
behlendorf
pushed a commit
that referenced
this issue
May 20, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11064 Closes #11911
sempervictus
pushed a commit
to sempervictus/zfs
that referenced
this issue
May 31, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes openzfs#11064 Closes openzfs#11911
tonyhutter
pushed a commit
that referenced
this issue
Jun 23, 2021
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 <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #11064 Closes #11911
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Triage Needed
New issue which needs to be triaged
Type: Defect
Incorrect behavior (e.g. crash, hang)
System information
(I realise this is a vaguely out-of-date version, but the code on the
master
branch is identical to the one under thezfs-0.8.4
tag so I'm reporting anyway.Describe the problem you're observing
Calling
zfs_prop_inherit()
to, e.g., remove a user property doesn't make it go away from the cache in the handle.Describe how to reproduce the problem
prints
and likewise for
zfs_get_all_props()
, but I'll spare the volumous output.The user prop fastpath just returns after the ioctl():
but the native prop path synchronises the properties as well:
As seen above, calling
zfs_refresh_properties()
, which is a trivial wrapper aroundget_stats()
, fixes this.The text was updated successfully, but these errors were encountered: