Skip to content

Commit

Permalink
DLPX-81529 DOSE-Azure: object-protocol is not getting set as a zpool …
Browse files Browse the repository at this point in the history
…property (openzfs#476)
  • Loading branch information
manoj-joseph authored Jun 14, 2022
1 parent 4869939 commit 484b664
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,14 @@ zpool_do_create(int argc, char **argv)
goto errout;
}

/* Allocate props before passing it */
if (props == NULL &&
nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) {
(void) fprintf(stderr,
gettext("internal error: out of memory\n"));
return (1);
}

char *profile;
if ((nvlist_lookup_string(props,
zpool_prop_to_name(ZPOOL_PROP_OBJ_CRED_PROFILE), &profile)) == 0) {
Expand Down
9 changes: 9 additions & 0 deletions cmd/zpool/zpool_vdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,15 @@ construct_spec(nvlist_t *props, int argc, char **argv)
argv[1])) == NULL) {
goto spec_out;
}

/*
* Add object-protocol as a property so that it is set
* as a zpool property.
*/
fnvlist_add_string(props,
zpool_prop_to_name(ZPOOL_PROP_OBJ_PROTOCOL),
fulltype);

argc -= 2;
argv += 2;
} else {
Expand Down

0 comments on commit 484b664

Please sign in to comment.