mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-06-01 03:34:10 +03:00
implicit conversion from 'boolean_t' to 'ds_hold_flags_t'
Build error on illumos with gcc 10 did reveal:
In function 'dmu_objset_refresh_ownership':
../../common/fs/zfs/dmu_objset.c:857:25: error: implicit conversion
from 'boolean_t' to 'ds_hold_flags_t' {aka 'enum ds_hold_flags'}
[-Werror=enum-conversion]
857 | dsl_dataset_disown(ds, decrypt, tag);
| ^~~~~~~
cc1: all warnings being treated as errors
libzfs_input_check.c: In function 'zfs_ioc_input_tests':
libzfs_input_check.c:754:28: error: implicit conversion from
'enum dmu_objset_type' to 'enum lzc_dataset_type'
[-Werror=enum-conversion]
754 | err = lzc_create(dataset, DMU_OST_ZFS, NULL, NULL, 0);
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
The same issue is present in openzfs, and also the same issue about
ds_hold_flags_t, which currently defines exactly one valid value.
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Toomas Soome <tsoome@me.com>
Closes #11406
This commit is contained in:
committed by
Brian Behlendorf
parent
fcd9966ed9
commit
921ec61b77
@@ -2626,7 +2626,7 @@ dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
|
||||
{
|
||||
int err;
|
||||
dsl_dataset_t *fromds;
|
||||
ds_hold_flags_t dsflags = (rawok) ? 0 : DS_HOLD_FLAG_DECRYPT;
|
||||
ds_hold_flags_t dsflags;
|
||||
struct dmu_send_params dspp = {0};
|
||||
dspp.embedok = embedok;
|
||||
dspp.large_block_ok = large_block_ok;
|
||||
@@ -2638,6 +2638,7 @@ dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
|
||||
dspp.rawok = rawok;
|
||||
dspp.savedok = savedok;
|
||||
|
||||
dsflags = (rawok) ? DS_HOLD_FLAG_NONE : DS_HOLD_FLAG_DECRYPT;
|
||||
err = dsl_pool_hold(pool, FTAG, &dspp.dp);
|
||||
if (err != 0)
|
||||
return (err);
|
||||
@@ -2711,12 +2712,13 @@ dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok,
|
||||
dmu_send_outparams_t *dsop)
|
||||
{
|
||||
int err = 0;
|
||||
ds_hold_flags_t dsflags = (rawok) ? 0 : DS_HOLD_FLAG_DECRYPT;
|
||||
ds_hold_flags_t dsflags;
|
||||
boolean_t owned = B_FALSE;
|
||||
dsl_dataset_t *fromds = NULL;
|
||||
zfs_bookmark_phys_t book = {0};
|
||||
struct dmu_send_params dspp = {0};
|
||||
|
||||
dsflags = (rawok) ? DS_HOLD_FLAG_NONE : DS_HOLD_FLAG_DECRYPT;
|
||||
dspp.tosnap = tosnap;
|
||||
dspp.embedok = embedok;
|
||||
dspp.large_block_ok = large_block_ok;
|
||||
|
||||
Reference in New Issue
Block a user