From d0cb5eff64d610ded2eb4e4f5f245fcfc7a1be38 Mon Sep 17 00:00:00 2001 From: George Amanakis Date: Tue, 21 Feb 2023 18:36:22 +0100 Subject: [PATCH] Partially revert eee9362a7 With commit 34ce4c42f applied, there is no need for eee9362a7. Revert that aside from the test. All tests introduced in those commits pass. Reviewed-by: Richard Yao Reviewed-by: Brian Behlendorf Signed-off-by: George Amanakis Closes #14502 --- module/zfs/dmu_objset.c | 7 +++++++ module/zfs/dsl_dataset.c | 19 ------------------- module/zfs/dsl_scan.c | 5 ----- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index ed0e8de38e5c..5ad3b2f269d6 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -2408,6 +2408,13 @@ dmu_objset_id_quota_upgrade_cb(objset_t *os) dmu_objset_userobjspace_present(os)) return (SET_ERROR(ENOTSUP)); + if (dmu_objset_userobjused_enabled(os)) + dmu_objset_ds(os)->ds_feature_activation[ + SPA_FEATURE_USEROBJ_ACCOUNTING] = (void *)B_TRUE; + if (dmu_objset_projectquota_enabled(os)) + dmu_objset_ds(os)->ds_feature_activation[ + SPA_FEATURE_PROJECT_QUOTA] = (void *)B_TRUE; + err = dmu_objset_space_upgrade(os); if (err) return (err); diff --git a/module/zfs/dsl_dataset.c b/module/zfs/dsl_dataset.c index 08de2546a55c..a844059de495 100644 --- a/module/zfs/dsl_dataset.c +++ b/module/zfs/dsl_dataset.c @@ -1747,25 +1747,6 @@ 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 some flags such as SPA_FEATURE_LARGE_BLOCKS - * will not be set and a subsequent encrypted raw send will fail. Hence - * activate this feature if needed here. This needs to happen only in - * syncing context. - */ - if (dmu_tx_is_syncing(tx)) { - 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) { diff --git a/module/zfs/dsl_scan.c b/module/zfs/dsl_scan.c index 8d7c16341cd1..f3c639b0d04e 100644 --- a/module/zfs/dsl_scan.c +++ b/module/zfs/dsl_scan.c @@ -2025,11 +2025,6 @@ dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb, return; } - if (bp->blk_birth <= scn->scn_phys.scn_cur_min_txg) { - scn->scn_lt_min_this_txg++; - return; - } - bp_toread = kmem_alloc(sizeof (blkptr_t), KM_SLEEP); *bp_toread = *bp;