Skip to content
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

libzfs: don't mark prompt+raw as retriable, refresh cache after inheriting userprops #11911

Closed
wants to merge 2 commits into from

Commits on Apr 16, 2021

  1. libzfs: don't mark prompt+raw as retriable

    Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
    Closes openzfs#11031
    nabijaczleweli committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    95b084e View commit details
    Browse the repository at this point in the history
  2. 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:
    
    Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
    Closes openzfs#11064
    nabijaczleweli committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    05f60fd View commit details
    Browse the repository at this point in the history