Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
Show First 20 Lines • Show All 829 Lines • ▼ Show 20 Lines | if (embedok && | ||||
spa_feature_is_active(dp->dp_spa, SPA_FEATURE_EMBEDDED_DATA)) { | spa_feature_is_active(dp->dp_spa, SPA_FEATURE_EMBEDDED_DATA)) { | ||||
featureflags |= DMU_BACKUP_FEATURE_EMBED_DATA; | featureflags |= DMU_BACKUP_FEATURE_EMBED_DATA; | ||||
if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) | if (spa_feature_is_active(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) | ||||
featureflags |= DMU_BACKUP_FEATURE_LZ4; | featureflags |= DMU_BACKUP_FEATURE_LZ4; | ||||
} | } | ||||
if (compressok) { | if (compressok) { | ||||
featureflags |= DMU_BACKUP_FEATURE_COMPRESSED; | featureflags |= DMU_BACKUP_FEATURE_COMPRESSED; | ||||
} | } | ||||
if ((compressok || embedok) && | |||||
to_ds->ds_feature_inuse[SPA_FEATURE_ZSTD_COMPRESS]) | |||||
featureflags |= DMU_BACKUP_FEATURE_ZSTD; | |||||
if ((featureflags & | if ((featureflags & | ||||
(DMU_BACKUP_FEATURE_EMBED_DATA | DMU_BACKUP_FEATURE_COMPRESSED)) != | (DMU_BACKUP_FEATURE_EMBED_DATA | DMU_BACKUP_FEATURE_COMPRESSED)) != | ||||
0 && spa_feature_is_active(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) { | 0 && spa_feature_is_active(dp->dp_spa, SPA_FEATURE_LZ4_COMPRESS)) { | ||||
featureflags |= DMU_BACKUP_FEATURE_LZ4; | featureflags |= DMU_BACKUP_FEATURE_LZ4; | ||||
} | } | ||||
if (resumeobj != 0 || resumeoff != 0) { | if (resumeobj != 0 || resumeoff != 0) { | ||||
featureflags |= DMU_BACKUP_FEATURE_RESUMING; | featureflags |= DMU_BACKUP_FEATURE_RESUMING; | ||||
▲ Show 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | dmu_recv_begin_check(void *arg, dmu_tx_t *tx) | ||||
/* | /* | ||||
* The receiving code doesn't know how to translate large blocks | * The receiving code doesn't know how to translate large blocks | ||||
* to smaller ones, so the pool must have the LARGE_BLOCKS | * to smaller ones, so the pool must have the LARGE_BLOCKS | ||||
* feature enabled if the stream has LARGE_BLOCKS. | * feature enabled if the stream has LARGE_BLOCKS. | ||||
*/ | */ | ||||
if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && | if ((featureflags & DMU_BACKUP_FEATURE_LARGE_BLOCKS) && | ||||
!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) | !spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_LARGE_BLOCKS)) | ||||
return (SET_ERROR(ENOTSUP)); | |||||
if ((featureflags & DMU_BACKUP_FEATURE_ZSTD) && | |||||
!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_ZSTD_COMPRESS)) | |||||
return (SET_ERROR(ENOTSUP)); | |||||
if (!(DMU_STREAM_SUPPORTED(featureflags))) | |||||
return (SET_ERROR(ENOTSUP)); | return (SET_ERROR(ENOTSUP)); | ||||
error = dsl_dataset_hold(dp, tofs, FTAG, &ds); | error = dsl_dataset_hold(dp, tofs, FTAG, &ds); | ||||
if (error == 0) { | if (error == 0) { | ||||
/* target fs already exists; recv into temp clone */ | /* target fs already exists; recv into temp clone */ | ||||
/* Can't recv a clone into an existing fs */ | /* Can't recv a clone into an existing fs */ | ||||
if (flags & DRR_FLAG_CLONE || drba->drba_origin) { | if (flags & DRR_FLAG_CLONE || drba->drba_origin) { | ||||
▲ Show 20 Lines • Show All 1,932 Lines • Show Last 20 Lines |