mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix setting the large_block feature after receiving a snapshot
We are not allowed to dirty a filesystem when done receiving a snapshot. In this case the flag SPA_FEATURE_LARGE_BLOCKS will not be set on that filesystem since the filesystem is not on dp_dirty_datasets, and a subsequent encrypted raw send will fail. Fix this by checking in dsl_dataset_snapshot_sync_impl() if the feature needs to be activated and do so if appropriate. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes #13699 Closes #13782
This commit is contained in:
committed by
Tony Hutter
parent
2c50512ad2
commit
c8d2ab05e1
@@ -1747,6 +1747,21 @@ dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We are not allowed to dirty a filesystem when done receiving
|
||||
* a snapshot. In this case the flag SPA_FEATURE_LARGE_BLOCKS will
|
||||
* not be set and a subsequent encrypted raw send will fail. Hence
|
||||
* activate this feature if needed here.
|
||||
*/
|
||||
for (spa_feature_t f = 0; f < SPA_FEATURES; f++) {
|
||||
if (zfeature_active(f, ds->ds_feature_activation[f]) &&
|
||||
!(zfeature_active(f, ds->ds_feature[f]))) {
|
||||
dsl_dataset_activate_feature(dsobj, f,
|
||||
ds->ds_feature_activation[f], tx);
|
||||
ds->ds_feature[f] = ds->ds_feature_activation[f];
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT3U(ds->ds_prev != 0, ==,
|
||||
dsl_dataset_phys(ds)->ds_prev_snap_obj != 0);
|
||||
if (ds->ds_prev) {
|
||||
|
||||
Reference in New Issue
Block a user