diff options
author | Brian Behlendorf <[email protected]> | 2017-09-07 09:48:26 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-09-07 10:00:54 -0700 |
commit | e0dd0a32a8c8db725be673153b09bee0ca9adcf2 (patch) | |
tree | 8b0734d4a937f77942bf36eb4f45ae5531e5337b | |
parent | 4c5b89f59e4e5c8f5b4680040118ebde09598bbe (diff) |
Revert "Handle new dnode size in incremental..."
This reverts commit 65dcb0f67a4d72ee4e1e534703db5caacf1ec85f until
a comprehensive fix is finalized. The stricter interior dnode
detection in 4c5b89f59e4e5c8f5b4680040118ebde09598bbe and the new
test case added by this patch revealed a issue with resizing
dnodes when receiving an incremental backup stream.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #6576
-rw-r--r-- | module/zfs/dmu_send.c | 8 | ||||
-rw-r--r-- | tests/runfiles/linux.run | 2 | ||||
-rw-r--r-- | tests/zfs-tests/tests/functional/rsend/Makefile.am | 1 | ||||
-rwxr-xr-x | tests/zfs-tests/tests/functional/rsend/send_changed_dnodesize.ksh | 66 |
4 files changed, 4 insertions, 73 deletions
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index 882926b75..359ef99d3 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -2482,13 +2482,11 @@ receive_object(struct receive_writer_arg *rwa, struct drr_object *drro, } else if (drro->drr_type != doi.doi_type || drro->drr_blksz != doi.doi_data_block_size || drro->drr_bonustype != doi.doi_bonus_type || - drro->drr_bonuslen != doi.doi_bonus_size || - drro->drr_dn_slots != (doi.doi_dnodesize >> DNODE_SHIFT)) { + drro->drr_bonuslen != doi.doi_bonus_size) { /* currently allocated, but with different properties */ - err = dmu_object_reclaim_dnsize(rwa->os, drro->drr_object, + err = dmu_object_reclaim(rwa->os, drro->drr_object, drro->drr_type, drro->drr_blksz, - drro->drr_bonustype, drro->drr_bonuslen, - drro->drr_dn_slots << DNODE_SHIFT, tx); + drro->drr_bonustype, drro->drr_bonuslen, tx); } if (err != 0) { dmu_tx_commit(tx); diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index b8e5efd21..58af01e7d 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -520,7 +520,7 @@ tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos', 'send-c_lz4_disabled', 'send-c_recv_lz4_disabled', 'send-c_mixed_compression', 'send-c_stream_size_estimate', 'send-cD', 'send-c_embedded_blocks', 'send-c_resume', 'send-cpL_varied_recsize', - 'send-c_recv_dedup', 'send_encrypted_heirarchy', 'send_changed_dnodesize'] + 'send-c_recv_dedup', 'send_encrypted_heirarchy'] [tests/functional/scrub_mirror] tests = ['scrub_mirror_001_pos', 'scrub_mirror_002_pos', diff --git a/tests/zfs-tests/tests/functional/rsend/Makefile.am b/tests/zfs-tests/tests/functional/rsend/Makefile.am index 7d5d1f027..199acb68b 100644 --- a/tests/zfs-tests/tests/functional/rsend/Makefile.am +++ b/tests/zfs-tests/tests/functional/rsend/Makefile.am @@ -23,7 +23,6 @@ dist_pkgdata_SCRIPTS = \ rsend_021_pos.ksh \ rsend_022_pos.ksh \ rsend_024_pos.ksh \ - send_changed_dnodesize.ksh \ send_encrypted_heirarchy.ksh \ send-cD.ksh \ send-c_embedded_blocks.ksh \ diff --git a/tests/zfs-tests/tests/functional/rsend/send_changed_dnodesize.ksh b/tests/zfs-tests/tests/functional/rsend/send_changed_dnodesize.ksh deleted file mode 100755 index e481b6f17..000000000 --- a/tests/zfs-tests/tests/functional/rsend/send_changed_dnodesize.ksh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/ksh - -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright (c) 2017 by Lawrence Livermore National Security, LLC. -# - -. $STF_SUITE/include/libtest.shlib -. $STF_SUITE/tests/functional/rsend/rsend.kshlib - -# -# Description: -# Verify incremental receive properly handles objects with changed -# dnode size. -# -# Strategy: -# 1. Populate a dataset with dnodesize=auto with objects -# 2. Take a snapshot -# 3. Remove objects and set dnodesize=legacy -# 4. Remount dataset so object numbers get recycled and formerly -# "interior" dnode slots get assigned to new objects -# 5. Repopulate dataset -# 6. Send first snapshot to new dataset -# 7. Send incremental snapshot from second snapshot to new dataset -# - -verify_runnable "both" - -log_assert "Verify incremental receive handles objects with changed dnode size" - -function cleanup -{ - rm -f $BACKDIR/fs-dn-auto - rm -f $BACKDIR/fs-dn-legacy -} - -log_onexit cleanup - -log_must zfs create -o dnodesize=auto $POOL/fs -mk_files 200 262144 0 $POOL/fs -log_must zfs unmount $POOL/fs -log_must zfs snapshot $POOL/fs@a -log_must zfs mount $POOL/fs -log_must rm /$POOL/fs/* -log_must zfs unmount $POOL/fs -log_must zfs set dnodesize=legacy $POOL/fs -log_must zfs mount $POOL/fs -mk_files 200 262144 0 $POOL/fs -log_must zfs unmount $POOL/fs -log_must zfs snapshot $POOL/fs@b -log_must eval "zfs send $POOL/fs@a > $BACKDIR/fs-dn-auto" -log_must eval "zfs send -i $POOL/fs@a $POOL/fs@b > $BACKDIR/fs-dn-legacy" -log_must eval "zfs recv $POOL/newfs < $BACKDIR/fs-dn-auto" -log_must eval "zfs recv $POOL/newfs < $BACKDIR/fs-dn-legacy" - -log_pass "Verify incremental receive handles objects with changed dnode size" |