diff options
author | mav <mav@FreeBSD.org> | 2016-03-21 00:16:42 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-21 00:16:42 +0000 |
commit | 7ce73419509341aa3b07e2c5fdd9e37642ae233f (patch) | |
tree | 911218a5e6816b002be27c588bda1be86a32742a /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c | |
parent | e8c59c3978b63d775c388972a9f93aad5eef1651 (diff) | |
download | FreeBSD-src-7ce73419509341aa3b07e2c5fdd9e37642ae233f.zip FreeBSD-src-7ce73419509341aa3b07e2c5fdd9e37642ae233f.tar.gz |
MFC r296516: MFV r296515:
6536 zfs send: want a way to disable setting of DRR_FLAG_FREERECORDS
Reviewed by: Anil Vijarnia <avijarnia@racktopsystems.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andrew Stormont <astormont@racktopsystems.com>
illumos/illumos-gate@880094b6062aebeec8eda6a8651757611c83b13e
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c index 00f52d6..d07319d 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c @@ -25,6 +25,7 @@ * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska <mm@FreeBSD.org>. All rights reserved. * Copyright 2014 HybridCluster. All rights reserved. + * Copyright 2016 RackTop Systems. */ #include <sys/dmu.h> @@ -64,6 +65,12 @@ int zfs_send_corrupt_data = B_FALSE; int zfs_send_queue_length = 16 * 1024 * 1024; int zfs_recv_queue_length = 16 * 1024 * 1024; +/* Set this tunable to FALSE to disable setting of DRR_FLAG_FREERECORDS */ +int zfs_send_set_freerecords_bit = B_TRUE; + +#ifdef _KERNEL +TUNABLE_INT("vfs.zfs.send_set_freerecords_bit", &zfs_send_set_freerecords_bit); +#endif static char *dmu_recv_tag = "dmu_recv_tag"; const char *recv_clone_name = "%recv"; @@ -771,7 +778,8 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds, drr->drr_u.drr_begin.drr_toguid = dsl_dataset_phys(to_ds)->ds_guid; if (dsl_dataset_phys(to_ds)->ds_flags & DS_FLAG_CI_DATASET) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CI_DATA; - drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_FREERECORDS; + if (zfs_send_set_freerecords_bit) + drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_FREERECORDS; if (ancestor_zb != NULL) { drr->drr_u.drr_begin.drr_fromguid = |