Fix gcc cast warnings
Gcc -Wall warn: 'lacks a cast' Gcc -Wall warn: 'comparison between pointer and integer' Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
d6320ddb78
commit
b8864a233c
|
@ -874,8 +874,8 @@ dump_history(spa_t *spa)
|
||||||
(void) snprintf(internalstr,
|
(void) snprintf(internalstr,
|
||||||
sizeof (internalstr),
|
sizeof (internalstr),
|
||||||
"[internal %s txg:%lld] %s",
|
"[internal %s txg:%lld] %s",
|
||||||
zfs_history_event_names[ievent], txg,
|
zfs_history_event_names[ievent],
|
||||||
intstr);
|
(longlong_t)txg, intstr);
|
||||||
cmd = internalstr;
|
cmd = internalstr;
|
||||||
}
|
}
|
||||||
tsec = time;
|
tsec = time;
|
||||||
|
|
|
@ -1682,7 +1682,7 @@ upgrade_set_callback(zfs_handle_t *zhp, void *data)
|
||||||
if (version < cb->cb_version) {
|
if (version < cb->cb_version) {
|
||||||
char verstr[16];
|
char verstr[16];
|
||||||
(void) snprintf(verstr, sizeof (verstr),
|
(void) snprintf(verstr, sizeof (verstr),
|
||||||
"%llu", cb->cb_version);
|
"%llu", (u_longlong_t)cb->cb_version);
|
||||||
if (cb->cb_lastfs[0] && !same_pool(zhp, cb->cb_lastfs)) {
|
if (cb->cb_lastfs[0] && !same_pool(zhp, cb->cb_lastfs)) {
|
||||||
/*
|
/*
|
||||||
* If they did "zfs upgrade -a", then we could
|
* If they did "zfs upgrade -a", then we could
|
||||||
|
@ -1720,7 +1720,7 @@ zfs_do_upgrade(int argc, char **argv)
|
||||||
boolean_t showversions = B_FALSE;
|
boolean_t showversions = B_FALSE;
|
||||||
int ret;
|
int ret;
|
||||||
upgrade_cbdata_t cb = { 0 };
|
upgrade_cbdata_t cb = { 0 };
|
||||||
char c;
|
signed char c;
|
||||||
int flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
|
int flags = ZFS_ITER_ARGS_CAN_BE_PATHS;
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
|
@ -1789,11 +1789,11 @@ zfs_do_upgrade(int argc, char **argv)
|
||||||
ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM,
|
ret = zfs_for_each(argc, argv, flags, ZFS_TYPE_FILESYSTEM,
|
||||||
NULL, NULL, 0, upgrade_set_callback, &cb);
|
NULL, NULL, 0, upgrade_set_callback, &cb);
|
||||||
(void) printf(gettext("%llu filesystems upgraded\n"),
|
(void) printf(gettext("%llu filesystems upgraded\n"),
|
||||||
cb.cb_numupgraded);
|
(u_longlong_t)cb.cb_numupgraded);
|
||||||
if (cb.cb_numsamegraded) {
|
if (cb.cb_numsamegraded) {
|
||||||
(void) printf(gettext("%llu filesystems already at "
|
(void) printf(gettext("%llu filesystems already at "
|
||||||
"this version\n"),
|
"this version\n"),
|
||||||
cb.cb_numsamegraded);
|
(u_longlong_t)cb.cb_numsamegraded);
|
||||||
}
|
}
|
||||||
if (cb.cb_numfailed != 0)
|
if (cb.cb_numfailed != 0)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
@ -1957,9 +1957,9 @@ print_header(zprop_list_t *pl)
|
||||||
if (pl->pl_next == NULL && !right_justify)
|
if (pl->pl_next == NULL && !right_justify)
|
||||||
(void) printf("%s", header);
|
(void) printf("%s", header);
|
||||||
else if (right_justify)
|
else if (right_justify)
|
||||||
(void) printf("%*s", pl->pl_width, header);
|
(void) printf("%*s", (int)pl->pl_width, header);
|
||||||
else
|
else
|
||||||
(void) printf("%-*s", pl->pl_width, header);
|
(void) printf("%-*s", (int)pl->pl_width, header);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) printf("\n");
|
(void) printf("\n");
|
||||||
|
@ -2550,7 +2550,7 @@ zfs_do_set(int argc, char **argv)
|
||||||
usage(B_FALSE);
|
usage(B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = zfs_for_each(argc - 2, argv + 2, NULL,
|
ret = zfs_for_each(argc - 2, argv + 2, 0,
|
||||||
ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb);
|
ZFS_TYPE_DATASET, NULL, NULL, 0, set_callback, &cb);
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
|
@ -2567,7 +2567,7 @@ zfs_do_snapshot(int argc, char **argv)
|
||||||
{
|
{
|
||||||
boolean_t recursive = B_FALSE;
|
boolean_t recursive = B_FALSE;
|
||||||
int ret;
|
int ret;
|
||||||
char c;
|
signed char c;
|
||||||
nvlist_t *props;
|
nvlist_t *props;
|
||||||
|
|
||||||
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
|
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
|
||||||
|
|
|
@ -2438,9 +2438,9 @@ print_header(zprop_list_t *pl)
|
||||||
if (pl->pl_next == NULL && !right_justify)
|
if (pl->pl_next == NULL && !right_justify)
|
||||||
(void) printf("%s", header);
|
(void) printf("%s", header);
|
||||||
else if (right_justify)
|
else if (right_justify)
|
||||||
(void) printf("%*s", pl->pl_width, header);
|
(void) printf("%*s", (int)pl->pl_width, header);
|
||||||
else
|
else
|
||||||
(void) printf("%-*s", pl->pl_width, header);
|
(void) printf("%-*s", (int)pl->pl_width, header);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void) printf("\n");
|
(void) printf("\n");
|
||||||
|
@ -3906,7 +3906,7 @@ upgrade_one(zpool_handle_t *zhp, void *data)
|
||||||
if (cur_version > cbp->cb_version) {
|
if (cur_version > cbp->cb_version) {
|
||||||
(void) printf(gettext("Pool '%s' is already formatted "
|
(void) printf(gettext("Pool '%s' is already formatted "
|
||||||
"using more current version '%llu'.\n"),
|
"using more current version '%llu'.\n"),
|
||||||
zpool_get_name(zhp), cur_version);
|
zpool_get_name(zhp), (u_longlong_t) cur_version);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (cur_version == cbp->cb_version) {
|
if (cur_version == cbp->cb_version) {
|
||||||
|
@ -4147,8 +4147,8 @@ get_history_one(zpool_handle_t *zhp, void *data)
|
||||||
continue;
|
continue;
|
||||||
(void) snprintf(internalstr,
|
(void) snprintf(internalstr,
|
||||||
sizeof (internalstr),
|
sizeof (internalstr),
|
||||||
"[internal %s txg:%lld] %s",
|
"[internal %s txg:%llu] %s",
|
||||||
zfs_history_event_names[ievent], txg,
|
zfs_history_event_names[ievent], (u_longlong_t)txg,
|
||||||
pathstr);
|
pathstr);
|
||||||
cmdstr = internalstr;
|
cmdstr = internalstr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2022,7 +2022,7 @@ ztest_od_init(ztest_od_t *od, uint64_t id, char *tag, uint64_t index,
|
||||||
od->od_gen = 0;
|
od->od_gen = 0;
|
||||||
|
|
||||||
(void) snprintf(od->od_name, sizeof (od->od_name), "%s(%lld)[%llu]",
|
(void) snprintf(od->od_name, sizeof (od->od_name), "%s(%lld)[%llu]",
|
||||||
tag, (int64_t)id, index);
|
tag, (longlong_t)id, (u_longlong_t)index);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -3042,11 +3042,16 @@ ztest_dsl_dataset_cleanup(char *osname, uint64_t id)
|
||||||
char snap3name[MAXNAMELEN];
|
char snap3name[MAXNAMELEN];
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
(void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu", osname, id);
|
(void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu",
|
||||||
(void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu", osname, id);
|
osname, (u_longlong_t)id);
|
||||||
(void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu", clone1name, id);
|
(void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu",
|
||||||
(void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu", osname, id);
|
osname, (u_longlong_t)id);
|
||||||
(void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu", clone1name, id);
|
(void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu",
|
||||||
|
clone1name, (u_longlong_t)id);
|
||||||
|
(void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu",
|
||||||
|
osname, (u_longlong_t)id);
|
||||||
|
(void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu",
|
||||||
|
clone1name, (u_longlong_t)id);
|
||||||
|
|
||||||
error = dmu_objset_destroy(clone2name, B_FALSE);
|
error = dmu_objset_destroy(clone2name, B_FALSE);
|
||||||
if (error && error != ENOENT)
|
if (error && error != ENOENT)
|
||||||
|
@ -3086,11 +3091,16 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
||||||
|
|
||||||
ztest_dsl_dataset_cleanup(osname, id);
|
ztest_dsl_dataset_cleanup(osname, id);
|
||||||
|
|
||||||
(void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu", osname, id);
|
(void) snprintf(snap1name, MAXNAMELEN, "%s@s1_%llu",
|
||||||
(void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu", osname, id);
|
osname, (u_longlong_t)id);
|
||||||
(void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu", clone1name, id);
|
(void) snprintf(clone1name, MAXNAMELEN, "%s/c1_%llu",
|
||||||
(void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu", osname, id);
|
osname, (u_longlong_t)id);
|
||||||
(void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu", clone1name, id);
|
(void) snprintf(snap2name, MAXNAMELEN, "%s@s2_%llu",
|
||||||
|
clone1name, (u_longlong_t)id);
|
||||||
|
(void) snprintf(clone2name, MAXNAMELEN, "%s/c2_%llu",
|
||||||
|
osname, (u_longlong_t)id);
|
||||||
|
(void) snprintf(snap3name, MAXNAMELEN, "%s@s3_%llu",
|
||||||
|
clone1name, (u_longlong_t)id);
|
||||||
|
|
||||||
error = dmu_objset_snapshot(osname, strchr(snap1name, '@')+1,
|
error = dmu_objset_snapshot(osname, strchr(snap1name, '@')+1,
|
||||||
NULL, NULL, B_FALSE, B_FALSE, -1);
|
NULL, NULL, B_FALSE, B_FALSE, -1);
|
||||||
|
@ -3912,7 +3922,7 @@ ztest_fzap(ztest_ds_t *zd, uint64_t id)
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
(void) snprintf(name, sizeof (name), "fzap-%llu-%llu",
|
(void) snprintf(name, sizeof (name), "fzap-%llu-%llu",
|
||||||
id, value);
|
(u_longlong_t)id, (u_longlong_t)value);
|
||||||
|
|
||||||
tx = dmu_tx_create(os);
|
tx = dmu_tx_create(os);
|
||||||
dmu_tx_hold_zap(tx, object, B_TRUE, name);
|
dmu_tx_hold_zap(tx, object, B_TRUE, name);
|
||||||
|
|
|
@ -210,7 +210,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, "%d")
|
||||||
NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x")
|
NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x")
|
||||||
NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld")
|
NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld")
|
||||||
NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
|
NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
|
||||||
NVLIST_PRTFUNC(double, double, double, "0x%llf")
|
NVLIST_PRTFUNC(double, double, double, "0x%f")
|
||||||
NVLIST_PRTFUNC(string, char *, char *, "%s")
|
NVLIST_PRTFUNC(string, char *, char *, "%s")
|
||||||
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
|
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
|
||||||
|
|
||||||
|
@ -1216,7 +1216,7 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai,
|
||||||
boolean_t val, val_arg;
|
boolean_t val, val_arg;
|
||||||
|
|
||||||
/* scanf boolean_t from value and check for match */
|
/* scanf boolean_t from value and check for match */
|
||||||
sr = sscanf(value, "%"SCNi32, &val_arg);
|
sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg);
|
||||||
if ((sr == 1) &&
|
if ((sr == 1) &&
|
||||||
(nvpair_value_boolean_value(nvp, &val) == 0) &&
|
(nvpair_value_boolean_value(nvp, &val) == 0) &&
|
||||||
(val == val_arg))
|
(val == val_arg))
|
||||||
|
@ -1227,7 +1227,7 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai,
|
||||||
boolean_t *val_array, val_arg;
|
boolean_t *val_array, val_arg;
|
||||||
|
|
||||||
/* check indexed value of array for match */
|
/* check indexed value of array for match */
|
||||||
sr = sscanf(value, "%"SCNi32, &val_arg);
|
sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg);
|
||||||
if ((sr == 1) &&
|
if ((sr == 1) &&
|
||||||
(nvpair_value_boolean_array(nvp,
|
(nvpair_value_boolean_array(nvp,
|
||||||
&val_array, &a_len) == 0) &&
|
&val_array, &a_len) == 0) &&
|
||||||
|
|
|
@ -1906,7 +1906,7 @@ zfs_prop_get(zfs_handle_t *zhp, zfs_prop_t prop, char *propbuf, size_t proplen,
|
||||||
localtime_r(&time, &t) == NULL ||
|
localtime_r(&time, &t) == NULL ||
|
||||||
strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
|
strftime(propbuf, proplen, "%a %b %e %k:%M %Y",
|
||||||
&t) == 0)
|
&t) == 0)
|
||||||
(void) snprintf(propbuf, proplen, "%llu", val);
|
(void) snprintf(propbuf, proplen, "%llu", (u_longlong_t) val);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -2391,7 +2391,8 @@ zfs_prop_get_userquota(zfs_handle_t *zhp, const char *propname,
|
||||||
return (err);
|
return (err);
|
||||||
|
|
||||||
if (literal) {
|
if (literal) {
|
||||||
(void) snprintf(propbuf, proplen, "%llu", propvalue);
|
(void) snprintf(propbuf, proplen, "%llu",
|
||||||
|
(u_longlong_t)propvalue);
|
||||||
} else if (propvalue == 0 &&
|
} else if (propvalue == 0 &&
|
||||||
(type == ZFS_PROP_USERQUOTA || type == ZFS_PROP_GROUPQUOTA)) {
|
(type == ZFS_PROP_USERQUOTA || type == ZFS_PROP_GROUPQUOTA)) {
|
||||||
(void) strlcpy(propbuf, "none", proplen);
|
(void) strlcpy(propbuf, "none", proplen);
|
||||||
|
|
|
@ -118,7 +118,7 @@ get_stats_for_obj(differ_info_t *di, const char *dsname, uint64_t obj,
|
||||||
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
||||||
dgettext(TEXT_DOMAIN,
|
dgettext(TEXT_DOMAIN,
|
||||||
"Unable to determine path or stats for "
|
"Unable to determine path or stats for "
|
||||||
"object %lld in %s"), obj, dsname);
|
"object %lld in %s"), (longlong_t)obj, dsname);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -406,7 +406,7 @@ write_free_diffs(FILE *fp, differ_info_t *di, dmu_diff_record_t *dr)
|
||||||
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
(void) snprintf(di->errbuf, sizeof (di->errbuf),
|
||||||
dgettext(TEXT_DOMAIN,
|
dgettext(TEXT_DOMAIN,
|
||||||
"next allocated object (> %lld) find failure"),
|
"next allocated object (> %lld) find failure"),
|
||||||
zc.zc_obj);
|
(longlong_t)zc.zc_obj);
|
||||||
di->zerr = errno;
|
di->zerr = errno;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,7 +228,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len,
|
||||||
|
|
||||||
case ZPOOL_PROP_GUID:
|
case ZPOOL_PROP_GUID:
|
||||||
intval = zpool_get_prop_int(zhp, prop, &src);
|
intval = zpool_get_prop_int(zhp, prop, &src);
|
||||||
(void) snprintf(buf, len, "%llu", intval);
|
(void) snprintf(buf, len, "%llu", (u_longlong_t)intval);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ZPOOL_PROP_ALTROOT:
|
case ZPOOL_PROP_ALTROOT:
|
||||||
|
@ -295,7 +295,7 @@ zpool_get_prop(zpool_handle_t *zhp, zpool_prop_t prop, char *buf, size_t len,
|
||||||
vs->vs_aux), len);
|
vs->vs_aux), len);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
(void) snprintf(buf, len, "%llu", intval);
|
(void) snprintf(buf, len, "%llu", (u_longlong_t)intval);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1238,7 +1238,7 @@ zpool_rewind_exclaim(libzfs_handle_t *hdl, const char *name, boolean_t dryrun,
|
||||||
(void) nvlist_lookup_int64(nv, ZPOOL_CONFIG_REWIND_TIME, &loss);
|
(void) nvlist_lookup_int64(nv, ZPOOL_CONFIG_REWIND_TIME, &loss);
|
||||||
|
|
||||||
if (localtime_r((time_t *)&rewindto, &t) != NULL &&
|
if (localtime_r((time_t *)&rewindto, &t) != NULL &&
|
||||||
strftime(timestr, 128, 0, &t) != 0) {
|
strftime(timestr, 128, "%c", &t) != 0) {
|
||||||
if (dryrun) {
|
if (dryrun) {
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"Would be able to return %s "
|
"Would be able to return %s "
|
||||||
|
@ -1253,13 +1253,14 @@ zpool_rewind_exclaim(libzfs_handle_t *hdl, const char *name, boolean_t dryrun,
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"%s approximately %lld "),
|
"%s approximately %lld "),
|
||||||
dryrun ? "Would discard" : "Discarded",
|
dryrun ? "Would discard" : "Discarded",
|
||||||
(loss + 30) / 60);
|
((longlong_t)loss + 30) / 60);
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"minutes of transactions.\n"));
|
"minutes of transactions.\n"));
|
||||||
} else if (loss > 0) {
|
} else if (loss > 0) {
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"%s approximately %lld "),
|
"%s approximately %lld "),
|
||||||
dryrun ? "Would discard" : "Discarded", loss);
|
dryrun ? "Would discard" : "Discarded",
|
||||||
|
(longlong_t)loss);
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"seconds of transactions.\n"));
|
"seconds of transactions.\n"));
|
||||||
}
|
}
|
||||||
|
@ -1298,7 +1299,7 @@ zpool_explain_recover(libzfs_handle_t *hdl, const char *name, int reason,
|
||||||
"Recovery is possible, but will result in some data loss.\n"));
|
"Recovery is possible, but will result in some data loss.\n"));
|
||||||
|
|
||||||
if (localtime_r((time_t *)&rewindto, &t) != NULL &&
|
if (localtime_r((time_t *)&rewindto, &t) != NULL &&
|
||||||
strftime(timestr, 128, 0, &t) != 0) {
|
strftime(timestr, 128, "%c", &t) != 0) {
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"\tReturning the pool to its state as of %s\n"
|
"\tReturning the pool to its state as of %s\n"
|
||||||
"\tshould correct the problem. "),
|
"\tshould correct the problem. "),
|
||||||
|
@ -1312,11 +1313,13 @@ zpool_explain_recover(libzfs_handle_t *hdl, const char *name, int reason,
|
||||||
if (loss > 120) {
|
if (loss > 120) {
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"Approximately %lld minutes of data\n"
|
"Approximately %lld minutes of data\n"
|
||||||
"\tmust be discarded, irreversibly. "), (loss + 30) / 60);
|
"\tmust be discarded, irreversibly. "),
|
||||||
|
((longlong_t)loss + 30) / 60);
|
||||||
} else if (loss > 0) {
|
} else if (loss > 0) {
|
||||||
(void) printf(dgettext(TEXT_DOMAIN,
|
(void) printf(dgettext(TEXT_DOMAIN,
|
||||||
"Approximately %lld seconds of data\n"
|
"Approximately %lld seconds of data\n"
|
||||||
"\tmust be discarded, irreversibly. "), loss);
|
"\tmust be discarded, irreversibly. "),
|
||||||
|
(longlong_t)loss);
|
||||||
}
|
}
|
||||||
if (edata != 0 && edata != UINT64_MAX) {
|
if (edata != 0 && edata != UINT64_MAX) {
|
||||||
if (edata == 1) {
|
if (edata == 1) {
|
||||||
|
@ -2260,7 +2263,7 @@ zpool_vdev_fault(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||||
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
||||||
|
|
||||||
(void) snprintf(msg, sizeof (msg),
|
(void) snprintf(msg, sizeof (msg),
|
||||||
dgettext(TEXT_DOMAIN, "cannot fault %llu"), guid);
|
dgettext(TEXT_DOMAIN, "cannot fault %llu"), (u_longlong_t)guid);
|
||||||
|
|
||||||
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
||||||
zc.zc_guid = guid;
|
zc.zc_guid = guid;
|
||||||
|
@ -2295,7 +2298,7 @@ zpool_vdev_degrade(zpool_handle_t *zhp, uint64_t guid, vdev_aux_t aux)
|
||||||
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
||||||
|
|
||||||
(void) snprintf(msg, sizeof (msg),
|
(void) snprintf(msg, sizeof (msg),
|
||||||
dgettext(TEXT_DOMAIN, "cannot degrade %llu"), guid);
|
dgettext(TEXT_DOMAIN, "cannot degrade %llu"), (u_longlong_t)guid);
|
||||||
|
|
||||||
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
||||||
zc.zc_guid = guid;
|
zc.zc_guid = guid;
|
||||||
|
@ -2954,7 +2957,7 @@ zpool_vdev_clear(zpool_handle_t *zhp, uint64_t guid)
|
||||||
|
|
||||||
(void) snprintf(msg, sizeof (msg),
|
(void) snprintf(msg, sizeof (msg),
|
||||||
dgettext(TEXT_DOMAIN, "cannot clear errors for %llx"),
|
dgettext(TEXT_DOMAIN, "cannot clear errors for %llx"),
|
||||||
guid);
|
(u_longlong_t)guid);
|
||||||
|
|
||||||
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
(void) strlcpy(zc.zc_name, zhp->zpool_name, sizeof (zc.zc_name));
|
||||||
zc.zc_guid = guid;
|
zc.zc_guid = guid;
|
||||||
|
@ -3475,7 +3478,7 @@ zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj,
|
||||||
|
|
||||||
if (dsobj == 0) {
|
if (dsobj == 0) {
|
||||||
/* special case for the MOS */
|
/* special case for the MOS */
|
||||||
(void) snprintf(pathname, len, "<metadata>:<0x%llx>", obj);
|
(void) snprintf(pathname, len, "<metadata>:<0x%llx>", (longlong_t)obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3486,7 +3489,7 @@ zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj,
|
||||||
ZFS_IOC_DSOBJ_TO_DSNAME, &zc) != 0) {
|
ZFS_IOC_DSOBJ_TO_DSNAME, &zc) != 0) {
|
||||||
/* just write out a path of two object numbers */
|
/* just write out a path of two object numbers */
|
||||||
(void) snprintf(pathname, len, "<0x%llx>:<0x%llx>",
|
(void) snprintf(pathname, len, "<0x%llx>:<0x%llx>",
|
||||||
dsobj, obj);
|
(longlong_t)dsobj, (longlong_t)obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void) strlcpy(dsname, zc.zc_value, sizeof (dsname));
|
(void) strlcpy(dsname, zc.zc_value, sizeof (dsname));
|
||||||
|
@ -3507,7 +3510,7 @@ zpool_obj_to_path(zpool_handle_t *zhp, uint64_t dsobj, uint64_t obj,
|
||||||
dsname, zc.zc_value);
|
dsname, zc.zc_value);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(void) snprintf(pathname, len, "%s:<0x%llx>", dsname, obj);
|
(void) snprintf(pathname, len, "%s:<0x%llx>", dsname, (longlong_t)obj);
|
||||||
}
|
}
|
||||||
free(mntpnt);
|
free(mntpnt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1571,7 +1571,7 @@ recv_rename(libzfs_handle_t *hdl, const char *name, const char *tryname,
|
||||||
|
|
||||||
(void) strncpy(newname, name, baselen);
|
(void) strncpy(newname, name, baselen);
|
||||||
(void) snprintf(newname+baselen, ZFS_MAXNAMELEN-baselen,
|
(void) snprintf(newname+baselen, ZFS_MAXNAMELEN-baselen,
|
||||||
"recv-%u-%u", getpid(), seq);
|
"recv-%ld-%u", (long) getpid(), seq);
|
||||||
(void) strlcpy(zc.zc_value, newname, sizeof (zc.zc_value));
|
(void) strlcpy(zc.zc_value, newname, sizeof (zc.zc_value));
|
||||||
|
|
||||||
if (flags.verbose) {
|
if (flags.verbose) {
|
||||||
|
@ -2490,7 +2490,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||||
(void) printf("found clone origin %s\n", zc.zc_string);
|
(void) printf("found clone origin %s\n", zc.zc_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream_wantsnewfs = (drrb->drr_fromguid == NULL ||
|
stream_wantsnewfs = (drrb->drr_fromguid == 0 ||
|
||||||
(drrb->drr_flags & DRR_FLAG_CLONE));
|
(drrb->drr_flags & DRR_FLAG_CLONE));
|
||||||
|
|
||||||
if (stream_wantsnewfs) {
|
if (stream_wantsnewfs) {
|
||||||
|
|
|
@ -571,13 +571,13 @@ zfs_nicenum(uint64_t num, char *buf, size_t buflen)
|
||||||
u = " KMGTPE"[index];
|
u = " KMGTPE"[index];
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
(void) snprintf(buf, buflen, "%llu", n);
|
(void) snprintf(buf, buflen, "%llu", (u_longlong_t) n);
|
||||||
} else if ((num & ((1ULL << 10 * index) - 1)) == 0) {
|
} else if ((num & ((1ULL << 10 * index) - 1)) == 0) {
|
||||||
/*
|
/*
|
||||||
* If this is an even multiple of the base, always display
|
* If this is an even multiple of the base, always display
|
||||||
* without any decimal precision.
|
* without any decimal precision.
|
||||||
*/
|
*/
|
||||||
(void) snprintf(buf, buflen, "%llu%c", n, u);
|
(void) snprintf(buf, buflen, "%llu%c", (u_longlong_t) n, u);
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* We want to choose a precision that reflects the best choice
|
* We want to choose a precision that reflects the best choice
|
||||||
|
@ -724,7 +724,7 @@ zcmd_alloc_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc, size_t len)
|
||||||
len = 16 * 1024;
|
len = 16 * 1024;
|
||||||
zc->zc_nvlist_dst_size = len;
|
zc->zc_nvlist_dst_size = len;
|
||||||
if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t)
|
if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t)
|
||||||
zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == NULL)
|
zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == 0)
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -740,8 +740,7 @@ zcmd_expand_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc)
|
||||||
{
|
{
|
||||||
free((void *)(uintptr_t)zc->zc_nvlist_dst);
|
free((void *)(uintptr_t)zc->zc_nvlist_dst);
|
||||||
if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t)
|
if ((zc->zc_nvlist_dst = (uint64_t)(uintptr_t)
|
||||||
zfs_alloc(hdl, zc->zc_nvlist_dst_size))
|
zfs_alloc(hdl, zc->zc_nvlist_dst_size)) == 0)
|
||||||
== NULL)
|
|
||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
|
|
@ -108,7 +108,7 @@ show_vdev_stats(const char *desc, const char *ctype, nvlist_t *nv, int indent)
|
||||||
(void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n",
|
(void) printf("%*s%s%*s%*s%*s %5s %5s %5s %5s %5s %5s %5s\n",
|
||||||
indent, "",
|
indent, "",
|
||||||
prefix,
|
prefix,
|
||||||
indent + strlen(prefix) - 25 - (vs->vs_space ? 0 : 12),
|
(int)(indent+strlen(prefix)-25-(vs->vs_space ? 0 : 12)),
|
||||||
desc,
|
desc,
|
||||||
vs->vs_space ? 6 : 0, vs->vs_space ? used : "",
|
vs->vs_space ? 6 : 0, vs->vs_space ? used : "",
|
||||||
vs->vs_space ? 6 : 0, vs->vs_space ? avail : "",
|
vs->vs_space ? 6 : 0, vs->vs_space ? avail : "",
|
||||||
|
|
|
@ -1725,12 +1725,12 @@ arc_evict(arc_state_t *state, uint64_t spa, int64_t bytes, boolean_t recycle,
|
||||||
if (mru_over > 0 && arc_mru_ghost->arcs_lsize[type] > 0) {
|
if (mru_over > 0 && arc_mru_ghost->arcs_lsize[type] > 0) {
|
||||||
int64_t todelete =
|
int64_t todelete =
|
||||||
MIN(arc_mru_ghost->arcs_lsize[type], mru_over);
|
MIN(arc_mru_ghost->arcs_lsize[type], mru_over);
|
||||||
arc_evict_ghost(arc_mru_ghost, NULL, todelete);
|
arc_evict_ghost(arc_mru_ghost, 0, todelete);
|
||||||
} else if (arc_mfu_ghost->arcs_lsize[type] > 0) {
|
} else if (arc_mfu_ghost->arcs_lsize[type] > 0) {
|
||||||
int64_t todelete = MIN(arc_mfu_ghost->arcs_lsize[type],
|
int64_t todelete = MIN(arc_mfu_ghost->arcs_lsize[type],
|
||||||
arc_mru_ghost->arcs_size +
|
arc_mru_ghost->arcs_size +
|
||||||
arc_mfu_ghost->arcs_size - arc_c);
|
arc_mfu_ghost->arcs_size - arc_c);
|
||||||
arc_evict_ghost(arc_mfu_ghost, NULL, todelete);
|
arc_evict_ghost(arc_mfu_ghost, 0, todelete);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1838,13 +1838,13 @@ arc_adjust(void)
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) {
|
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) {
|
||||||
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment);
|
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment);
|
||||||
(void) arc_evict(arc_mru, NULL, delta, FALSE, ARC_BUFC_DATA);
|
(void) arc_evict(arc_mru, 0, delta, FALSE, ARC_BUFC_DATA);
|
||||||
adjustment -= delta;
|
adjustment -= delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_METADATA] > 0) {
|
if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_METADATA] > 0) {
|
||||||
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_METADATA], adjustment);
|
delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_METADATA], adjustment);
|
||||||
(void) arc_evict(arc_mru, NULL, delta, FALSE,
|
(void) arc_evict(arc_mru, 0, delta, FALSE,
|
||||||
ARC_BUFC_METADATA);
|
ARC_BUFC_METADATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1856,14 +1856,14 @@ arc_adjust(void)
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_DATA] > 0) {
|
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_DATA] > 0) {
|
||||||
delta = MIN(adjustment, arc_mfu->arcs_lsize[ARC_BUFC_DATA]);
|
delta = MIN(adjustment, arc_mfu->arcs_lsize[ARC_BUFC_DATA]);
|
||||||
(void) arc_evict(arc_mfu, NULL, delta, FALSE, ARC_BUFC_DATA);
|
(void) arc_evict(arc_mfu, 0, delta, FALSE, ARC_BUFC_DATA);
|
||||||
adjustment -= delta;
|
adjustment -= delta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_METADATA] > 0) {
|
if (adjustment > 0 && arc_mfu->arcs_lsize[ARC_BUFC_METADATA] > 0) {
|
||||||
int64_t delta = MIN(adjustment,
|
int64_t delta = MIN(adjustment,
|
||||||
arc_mfu->arcs_lsize[ARC_BUFC_METADATA]);
|
arc_mfu->arcs_lsize[ARC_BUFC_METADATA]);
|
||||||
(void) arc_evict(arc_mfu, NULL, delta, FALSE,
|
(void) arc_evict(arc_mfu, 0, delta, FALSE,
|
||||||
ARC_BUFC_METADATA);
|
ARC_BUFC_METADATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1875,7 +1875,7 @@ arc_adjust(void)
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mru_ghost->arcs_size > 0) {
|
if (adjustment > 0 && arc_mru_ghost->arcs_size > 0) {
|
||||||
delta = MIN(arc_mru_ghost->arcs_size, adjustment);
|
delta = MIN(arc_mru_ghost->arcs_size, adjustment);
|
||||||
arc_evict_ghost(arc_mru_ghost, NULL, delta);
|
arc_evict_ghost(arc_mru_ghost, 0, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
adjustment =
|
adjustment =
|
||||||
|
@ -1883,7 +1883,7 @@ arc_adjust(void)
|
||||||
|
|
||||||
if (adjustment > 0 && arc_mfu_ghost->arcs_size > 0) {
|
if (adjustment > 0 && arc_mfu_ghost->arcs_size > 0) {
|
||||||
delta = MIN(arc_mfu_ghost->arcs_size, adjustment);
|
delta = MIN(arc_mfu_ghost->arcs_size, adjustment);
|
||||||
arc_evict_ghost(arc_mfu_ghost, NULL, delta);
|
arc_evict_ghost(arc_mfu_ghost, 0, delta);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2303,7 +2303,7 @@ arc_get_data_buf(arc_buf_t *buf)
|
||||||
state = (arc_mru->arcs_lsize[type] >= size &&
|
state = (arc_mru->arcs_lsize[type] >= size &&
|
||||||
mfu_space > arc_mfu->arcs_size) ? arc_mru : arc_mfu;
|
mfu_space > arc_mfu->arcs_size) ? arc_mru : arc_mfu;
|
||||||
}
|
}
|
||||||
if ((buf->b_data = arc_evict(state, NULL, size, TRUE, type)) == NULL) {
|
if ((buf->b_data = arc_evict(state, 0, size, TRUE, type)) == NULL) {
|
||||||
if (type == ARC_BUFC_METADATA) {
|
if (type == ARC_BUFC_METADATA) {
|
||||||
buf->b_data = zio_buf_alloc(size);
|
buf->b_data = zio_buf_alloc(size);
|
||||||
arc_space_consume(size, ARC_SPACE_DATA);
|
arc_space_consume(size, ARC_SPACE_DATA);
|
||||||
|
|
|
@ -1545,12 +1545,12 @@ sa_attr_register_sync(sa_handle_t *hdl, dmu_tx_t *tx)
|
||||||
|
|
||||||
mutex_enter(&sa->sa_lock);
|
mutex_enter(&sa->sa_lock);
|
||||||
|
|
||||||
if (!sa->sa_need_attr_registration || sa->sa_master_obj == NULL) {
|
if (!sa->sa_need_attr_registration || sa->sa_master_obj == 0) {
|
||||||
mutex_exit(&sa->sa_lock);
|
mutex_exit(&sa->sa_lock);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa->sa_reg_attr_obj == NULL) {
|
if (sa->sa_reg_attr_obj == 0) {
|
||||||
sa->sa_reg_attr_obj = zap_create(hdl->sa_os,
|
sa->sa_reg_attr_obj = zap_create(hdl->sa_os,
|
||||||
DMU_OT_SA_ATTR_REGISTRATION, DMU_OT_NONE, 0, tx);
|
DMU_OT_SA_ATTR_REGISTRATION, DMU_OT_NONE, 0, tx);
|
||||||
VERIFY(zap_add(hdl->sa_os, sa->sa_master_obj,
|
VERIFY(zap_add(hdl->sa_os, sa->sa_master_obj,
|
||||||
|
|
|
@ -483,7 +483,7 @@ zap_open_leaf(uint64_t blkid, dmu_buf_t *db)
|
||||||
ASSERT3U(ZAP_LEAF_HASH_NUMENTRIES(l), >, ZAP_LEAF_NUMCHUNKS(l) / 3);
|
ASSERT3U(ZAP_LEAF_HASH_NUMENTRIES(l), >, ZAP_LEAF_NUMCHUNKS(l) / 3);
|
||||||
|
|
||||||
/* The chunks should begin at the end of the hash table */
|
/* The chunks should begin at the end of the hash table */
|
||||||
ASSERT3P(&ZAP_LEAF_CHUNK(l, 0), ==,
|
ASSERT3P(&ZAP_LEAF_CHUNK(l, 0), ==, (zap_leaf_chunk_t *)
|
||||||
&l->l_phys->l_hash[ZAP_LEAF_HASH_NUMENTRIES(l)]);
|
&l->l_phys->l_hash[ZAP_LEAF_HASH_NUMENTRIES(l)]);
|
||||||
|
|
||||||
/* The chunks should end at the end of the block */
|
/* The chunks should end at the end of the block */
|
||||||
|
|
|
@ -166,7 +166,7 @@ history_str_get(zfs_cmd_t *zc)
|
||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
if (zc->zc_history == NULL)
|
if (zc->zc_history == 0)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP);
|
buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP);
|
||||||
|
@ -1866,7 +1866,7 @@ zfs_ioc_objset_zplprops(zfs_cmd_t *zc)
|
||||||
* which we aren't supposed to do with a DS_MODE_USER
|
* which we aren't supposed to do with a DS_MODE_USER
|
||||||
* hold, because it could be inconsistent.
|
* hold, because it could be inconsistent.
|
||||||
*/
|
*/
|
||||||
if (zc->zc_nvlist_dst != NULL &&
|
if (zc->zc_nvlist_dst != 0 &&
|
||||||
!zc->zc_objset_stats.dds_inconsistent &&
|
!zc->zc_objset_stats.dds_inconsistent &&
|
||||||
dmu_objset_type(os) == DMU_OST_ZFS) {
|
dmu_objset_type(os) == DMU_OST_ZFS) {
|
||||||
nvlist_t *nv;
|
nvlist_t *nv;
|
||||||
|
@ -2458,7 +2458,7 @@ zfs_ioc_set_prop(zfs_cmd_t *zc)
|
||||||
|
|
||||||
error = zfs_set_prop_nvlist(zc->zc_name, source, nvl, &errors);
|
error = zfs_set_prop_nvlist(zc->zc_name, source, nvl, &errors);
|
||||||
|
|
||||||
if (zc->zc_nvlist_dst != NULL && errors != NULL) {
|
if (zc->zc_nvlist_dst != 0 && errors != NULL) {
|
||||||
(void) put_nvlist(zc, errors);
|
(void) put_nvlist(zc, errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2609,7 +2609,7 @@ zfs_ioc_pool_get_props(zfs_cmd_t *zc)
|
||||||
spa_close(spa, FTAG);
|
spa_close(spa, FTAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error == 0 && zc->zc_nvlist_dst != NULL)
|
if (error == 0 && zc->zc_nvlist_dst != 0)
|
||||||
error = put_nvlist(zc, nvp);
|
error = put_nvlist(zc, nvp);
|
||||||
else
|
else
|
||||||
error = EFAULT;
|
error = EFAULT;
|
||||||
|
@ -2917,7 +2917,7 @@ zfs_ioc_create(zfs_cmd_t *zc)
|
||||||
strchr(zc->zc_name, '%'))
|
strchr(zc->zc_name, '%'))
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
if (zc->zc_nvlist_src != NULL &&
|
if (zc->zc_nvlist_src != 0 &&
|
||||||
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
||||||
zc->zc_iflags, &nvprops)) != 0)
|
zc->zc_iflags, &nvprops)) != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
@ -3041,7 +3041,7 @@ zfs_ioc_snapshot(zfs_cmd_t *zc)
|
||||||
if (snapshot_namecheck(zc->zc_value, NULL, NULL) != 0)
|
if (snapshot_namecheck(zc->zc_value, NULL, NULL) != 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
if (zc->zc_nvlist_src != NULL &&
|
if (zc->zc_nvlist_src != 0 &&
|
||||||
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
||||||
zc->zc_iflags, &nvprops)) != 0)
|
zc->zc_iflags, &nvprops)) != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
@ -3563,7 +3563,7 @@ zfs_ioc_recv(zfs_cmd_t *zc)
|
||||||
tosnap = strchr(tofs, '@');
|
tosnap = strchr(tofs, '@');
|
||||||
*tosnap++ = '\0';
|
*tosnap++ = '\0';
|
||||||
|
|
||||||
if (zc->zc_nvlist_src != NULL &&
|
if (zc->zc_nvlist_src != 0 &&
|
||||||
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
(error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
|
||||||
zc->zc_iflags, &props)) != 0)
|
zc->zc_iflags, &props)) != 0)
|
||||||
return (error);
|
return (error);
|
||||||
|
@ -3919,7 +3919,7 @@ zfs_ioc_clear(zfs_cmd_t *zc)
|
||||||
nvlist_t *policy;
|
nvlist_t *policy;
|
||||||
nvlist_t *config = NULL;
|
nvlist_t *config = NULL;
|
||||||
|
|
||||||
if (zc->zc_nvlist_src == NULL)
|
if (zc->zc_nvlist_src == 0)
|
||||||
return (EINVAL);
|
return (EINVAL);
|
||||||
|
|
||||||
if ((error = get_nvlist(zc->zc_nvlist_src,
|
if ((error = get_nvlist(zc->zc_nvlist_src,
|
||||||
|
|
|
@ -1299,7 +1299,7 @@ zil_clean(zilog_t *zilog, uint64_t synced_txg)
|
||||||
* created a bad performance problem.
|
* created a bad performance problem.
|
||||||
*/
|
*/
|
||||||
if (taskq_dispatch(zilog->zl_clean_taskq,
|
if (taskq_dispatch(zilog->zl_clean_taskq,
|
||||||
(void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == NULL)
|
(void (*)(void *))zil_itxg_clean, clean_me, TQ_NOSLEEP) == 0)
|
||||||
zil_itxg_clean(clean_me);
|
zil_itxg_clean(clean_me);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue