aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2023-04-03 14:49:30 +0000
committerMartin Matuska <mm@FreeBSD.org>2023-04-03 14:49:30 +0000
commit2a58b312b62f908ec92311d1bd8536dbaeb8e55b (patch)
treef6096fd35d318ddc1493acb3ab241f7ed7efbafb /sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
parentb98fbf3781df16f7797b2bbeabf205dc7d4985ae (diff)
parent431083f75bdd3efaee992bdd672625ec7240d252 (diff)
downloadsrc-2a58b312b62f908ec92311d1bd8536dbaeb8e55b.tar.gz
src-2a58b312b62f908ec92311d1bd8536dbaeb8e55b.zip
zfs: merge openzfs/zfs@431083f75
Notable upstream pull request merges: #12194 Fix short-lived txg caused by autotrim #13368 ZFS_IOC_COUNT_FILLED does unnecessary txg_wait_synced() #13392 Implementation of block cloning for ZFS #13741 SHA2 reworking and API for iterating over multiple implementations #14282 Sync thread should avoid holding the spa config write lock when possible #14283 txg_sync should handle write errors in ZIL #14359 More adaptive ARC eviction #14469 Fix NULL pointer dereference in zio_ready() #14479 zfs redact fails when dnodesize=auto #14496 improve error message of zfs redact #14500 Skip memory allocation when compressing holes #14501 FreeBSD: don't verify recycled vnode for zfs control directory #14502 partially revert PR 14304 (eee9362a7) #14509 Fix per-jail zfs.mount_snapshot setting #14514 Fix data race between zil_commit() and zil_suspend() #14516 System-wide speculative prefetch limit #14517 Use rw_tryupgrade() in dmu_bonus_hold_by_dnode() #14519 Do not hold spa_config in ZIL while blocked on IO #14523 Move dmu_buf_rele() after dsl_dataset_sync_done() #14524 Ignore too large stack in case of dsl_deadlist_merge #14526 Use .section .rodata instead of .rodata on FreeBSD #14528 ICP: AES-GCM: Refactor gcm_clear_ctx() #14529 ICP: AES-GCM: Unify gcm_init_ctx() and gmac_init_ctx() #14532 Handle unexpected errors in zil_lwb_commit() without ASSERT() #14544 icp: Prevent compilers from optimizing away memset() in gcm_clear_ctx() #14546 Revert zfeature_active() to static #14556 Remove bad kmem_free() oversight from previous zfsdev_state_list patch #14563 Optimize the is_l2cacheable functions #14565 FreeBSD: zfs_znode_alloc: lock the vnode earlier #14566 FreeBSD: fix false assert in cache_vop_rmdir when replaying ZIL #14567 spl: Add cmn_err_once() to log a message only on the first call #14568 Fix incremental receive silently failing for recursive sends #14569 Restore ASMABI and other Unify work #14576 Fix detection of IBM Power8 machines (ISA 2.07) #14577 Better handling for future crypto parameters #14600 zcommon: Refactor FPU state handling in fletcher4 #14603 Fix prefetching of indirect blocks while destroying #14633 Fixes in persistent error log #14639 FreeBSD: Remove extra arc_reduce_target_size() call #14641 Additional limits on hole reporting #14649 Drop lying to the compiler in the fletcher4 code #14652 panic loop when removing slog device #14653 Update vdev state for spare vdev #14655 Fix cloning into already dirty dbufs #14678 Revert "Do not hold spa_config in ZIL while blocked on IO" Obtained from: OpenZFS OpenZFS commit: 431083f75bdd3efaee992bdd672625ec7240d252
Diffstat (limited to 'sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c')
-rw-r--r--sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
index 9ecb1ac5c6fb..8fa36fa95a17 100644
--- a/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
+++ b/sys/contrib/openzfs/lib/libzfs/libzfs_dataset.c
@@ -1029,7 +1029,7 @@ zfs_valid_proplist(libzfs_handle_t *hdl, zfs_type_t type, nvlist_t *nvl,
{
nvpair_t *elem;
uint64_t intval;
- char *strval;
+ const char *strval;
zfs_prop_t prop;
nvlist_t *ret;
int chosen_normal = -1;
@@ -2065,7 +2065,7 @@ error:
* extract them appropriately.
*/
uint64_t
-getprop_uint64(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
+getprop_uint64(zfs_handle_t *zhp, zfs_prop_t prop, const char **source)
{
nvlist_t *nv;
uint64_t value;
@@ -2079,14 +2079,14 @@ getprop_uint64(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
verify(!zhp->zfs_props_table ||
zhp->zfs_props_table[prop] == B_TRUE);
value = zfs_prop_default_numeric(prop);
- *source = (char *)"";
+ *source = "";
}
return (value);
}
static const char *
-getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
+getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, const char **source)
{
nvlist_t *nv;
const char *value;
@@ -2100,7 +2100,7 @@ getprop_string(zfs_handle_t *zhp, zfs_prop_t prop, char **source)
verify(!zhp->zfs_props_table ||
zhp->zfs_props_table[prop] == B_TRUE);
value = zfs_prop_default_string(prop);
- *source = (char *)"";
+ *source = "";
}
return (value);
@@ -2138,7 +2138,7 @@ zfs_unset_recvd_props_mode(zfs_handle_t *zhp, uintptr_t *cookie)
*/
static int
get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
- char **source, uint64_t *val)
+ const char **source, uint64_t *val)
{
zfs_cmd_t zc = {"\0"};
nvlist_t *zplprops = NULL;
@@ -2370,7 +2370,7 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
* Calculate the source type, given the raw source string.
*/
static void
-get_source(zfs_handle_t *zhp, zprop_source_t *srctype, char *source,
+get_source(zfs_handle_t *zhp, zprop_source_t *srctype, const char *source,
char *statbuf, size_t statlen)
{
if (statbuf == NULL ||
@@ -2418,7 +2418,7 @@ zfs_prop_get_recvd(zfs_handle_t *zhp, const char *propname, char *propbuf,
zfs_unset_recvd_props_mode(zhp, &cookie);
} else {
nvlist_t *propval;
- char *recvdval;
+ const char *recvdval;
if (nvlist_lookup_nvlist(zhp->zfs_recvd_props,
propname, &propval) != 0)
return (-1);
@@ -2620,7 +2620,7 @@ zcp_check(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t intval,
(u_longlong_t)intval, (u_longlong_t)ans);
}
} else {
- char *str_ans;
+ const char *str_ans;
error = nvlist_lookup_string(retnvl, "value", &str_ans);
if (error != 0) {
(void) fprintf(stderr, "%s: zcp check error: "
@@ -2652,7 +2652,7 @@ int
zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
zprop_source_t *src, char *statbuf, size_t statlen, boolean_t literal)
{
- char *source = NULL;
+ const char *source = NULL;
uint64_t val;
const char *str;
const char *strval;
@@ -3053,7 +3053,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
uint64_t
zfs_prop_get_int(zfs_handle_t *zhp, zfs_prop_t prop)
{
- char *source;
+ const char *source;
uint64_t val = 0;
(void) get_numeric_property(zhp, prop, NULL, &source, &val);
@@ -3077,7 +3077,7 @@ int
zfs_prop_get_numeric(zfs_handle_t *zhp, zfs_prop_t prop, uint64_t *value,
zprop_source_t *src, char *statbuf, size_t statlen)
{
- char *source;
+ const char *source;
/*
* Check to see if this property applies to our object
@@ -4698,7 +4698,7 @@ zfs_expand_proplist(zfs_handle_t *zhp, zprop_list_t **plp, boolean_t received,
zprop_list_t **last, **start;
nvlist_t *userprops, *propval;
nvpair_t *elem;
- char *strval;
+ const char *strval;
char buf[ZFS_MAXPROPLEN];
if (zprop_expand_list(hdl, plp, ZFS_TYPE_DATASET) != 0)
@@ -5484,7 +5484,7 @@ volsize_from_vdevs(zpool_handle_t *zhp, uint64_t nblocks, uint64_t blksize)
}
for (int v = 0; v < nvdevs; v++) {
- char *type;
+ const char *type;
uint64_t nparity, ashift, asize, tsize;
uint64_t volsize;
@@ -5566,7 +5566,7 @@ zvol_volsize_to_reservation(zpool_handle_t *zph, uint64_t volsize,
uint64_t numdb;
uint64_t nblocks, volblocksize;
int ncopies;
- char *strval;
+ const char *strval;
if (nvlist_lookup_string(props,
zfs_prop_to_name(ZFS_PROP_COPIES), &strval) == 0)