Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch

This commit is contained in:
Brian Behlendorf 2010-06-14 14:44:55 -07:00
commit 3347c5c7e9
5 changed files with 17 additions and 14 deletions

View File

@ -868,8 +868,8 @@ dump_history(spa_t *spa)
(void) snprintf(internalstr,
sizeof (internalstr),
"[internal %s txg:%lld] %s",
zfs_history_event_names[ievent], txg,
intstr);
zfs_history_event_names[ievent],
(longlong_t)txg, intstr);
cmd = internalstr;
}
tsec = time;

View File

@ -2019,7 +2019,7 @@ ztest_od_init(ztest_od_t *od, uint64_t id, char *tag, uint64_t index,
od->od_gen = 0;
(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);
}
/*
@ -3919,7 +3919,7 @@ ztest_fzap(ztest_ds_t *zd, uint64_t id)
int error;
(void) snprintf(name, sizeof (name), "fzap-%llu-%llu",
id, value);
(u_longlong_t)id, (u_longlong_t)value);
tx = dmu_tx_create(os);
dmu_tx_hold_zap(tx, object, B_TRUE, name);

View File

@ -1233,7 +1233,7 @@ zpool_rewind_exclaim(libzfs_handle_t *hdl, const char *name, boolean_t dryrun,
(void) nvlist_lookup_int64(rbi, ZPOOL_CONFIG_REWIND_TIME, &loss);
if (localtime_r((time_t *)&rewindto, &t) != NULL &&
strftime(timestr, 128, 0, &t) != 0) {
strftime(timestr, 128, "%c", &t) != 0) {
if (dryrun) {
(void) printf(dgettext(TEXT_DOMAIN,
"Would be able to return %s "
@ -1248,13 +1248,14 @@ zpool_rewind_exclaim(libzfs_handle_t *hdl, const char *name, boolean_t dryrun,
(void) printf(dgettext(TEXT_DOMAIN,
"%s approximately %lld "),
dryrun ? "Would discard" : "Discarded",
(loss + 30) / 60);
((longlong_t)loss + 30) / 60);
(void) printf(dgettext(TEXT_DOMAIN,
"minutes of transactions.\n"));
} else if (loss > 0) {
(void) printf(dgettext(TEXT_DOMAIN,
"%s approximately %lld "),
dryrun ? "Would discard" : "Discarded", loss);
dryrun ? "Would discard" : "Discarded",
(longlong_t)loss);
(void) printf(dgettext(TEXT_DOMAIN,
"seconds of transactions.\n"));
}
@ -1292,7 +1293,7 @@ zpool_explain_recover(libzfs_handle_t *hdl, const char *name, int reason,
"Recovery is possible, but will result in some data loss.\n"));
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,
"\tReturning the pool to its state as of %s\n"
"\tshould correct the problem. "),
@ -1306,11 +1307,13 @@ zpool_explain_recover(libzfs_handle_t *hdl, const char *name, int reason,
if (loss > 120) {
(void) printf(dgettext(TEXT_DOMAIN,
"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) {
(void) printf(dgettext(TEXT_DOMAIN,
"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 == 1) {

View File

@ -1469,12 +1469,12 @@ sa_attr_register_sync(sa_handle_t *hdl, dmu_tx_t *tx)
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);
return;
}
if (sa->sa_reg_attr_obj == NULL) {
if (sa->sa_reg_attr_obj == 0) {
int error;
sa->sa_reg_attr_obj = zap_create(hdl->sa_os,
DMU_OT_SA_ATTR_REGISTRATION, DMU_OT_NONE, 0, tx);

View File

@ -2290,7 +2290,7 @@ zfs_ioc_set_prop(struct file *filp, zfs_cmd_t *zc)
error = zfs_set_prop_nvlist(filp, 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);
}
@ -3742,7 +3742,7 @@ zfs_ioc_clear(struct file *filp, zfs_cmd_t *zc)
nvlist_t *policy;
nvlist_t *config = NULL;
if (zc->zc_nvlist_src == NULL)
if (zc->zc_nvlist_src == 0)
return (EINVAL);
if ((error = get_nvlist(zc->zc_nvlist_src,