Skip to content

Instantly share code, notes, and snippets.

View pcd1193182's full-sized avatar

Paul Dagnelie pcd1193182

  • Delphix
View GitHub Profile
@pcd1193182
pcd1193182 / gist:6645777
Created September 21, 2013 00:41
one liner to build and install docker binary
sudo docker run -lxc-conf=lxc.aa_profile=unconfined -privileged -v `pwd`:/go/src/github.com/dotcloud/docker docker hack/make.sh binary && sudo service docker stop && sudo cp bundles/0.6.2-dev/binary/docker-0.6.2-dev /usr/bin/docker && sudo service docker start
From 4384827c99cd99e8b92bae738e77fbb8e29cdfce Mon Sep 17 00:00:00 2001
From: Paul Dagnelie <pcd@delphix.com>
Date: Wed, 6 Apr 2016 14:25:32 -0700
Subject: [PATCH] DLPX-43865 pbchk throws an error with git rm'd files
---
usr/src/tools/scripts/git-pbchk.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py
From 50d9cc58b8799deac0c43787b836f1dee5a06d60 Mon Sep 17 00:00:00 2001
From: Paul Dagnelie <pcd@delphix.com>
Date: Fri, 15 Apr 2016 11:39:27 -0700
Subject: [PATCH] fix
---
usr/src/tools/scripts/git-pbchk.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py
diff --git a/usr/src/uts/common/fs/zfs/dmu_traverse.c b/usr/src/uts/common/fs/zfs/dmu_traverse.c
index ac93002..a1a0293 100644
--- a/usr/src/uts/common/fs/zfs/dmu_traverse.c
+++ b/usr/src/uts/common/fs/zfs/dmu_traverse.c
@@ -39,6 +39,7 @@
#include <sys/zfeature.h>
int32_t zfs_pd_bytes_max = 50 * 1024 * 1024; /* 50MB */
+boolean_t ignore_hole_birth = B_FALSE;
@pcd1193182
pcd1193182 / gist:f91e950925d8edc0648ff4a69d00b08e
Last active August 23, 2016 16:38
alternate 4996 patch, now compiles, boots, passes 3.sh
diff --git a/usr/src/uts/common/fs/zfs/dnode_sync.c b/usr/src/uts/common/fs/zfs/dnode_sync.c
index d4e6502..c8c8240 100644
--- a/usr/src/uts/common/fs/zfs/dnode_sync.c
+++ b/usr/src/uts/common/fs/zfs/dnode_sync.c
@@ -111,7 +111,7 @@ dnode_increase_indirection(dnode_t *dn, dmu_tx_t *tx)
}
static void
-free_blocks(dnode_t *dn, blkptr_t *bp, int num, dmu_tx_t *tx)
+free_blocks(dnode_t *dn, blkptr_t *bp, int num, uint64_t birth, dmu_tx_t *tx)
diff --git a/usr/src/uts/common/fs/zfs/dnode.c b/usr/src/uts/common/fs/zfs/dnode.c
index 7fdb64d..540b23e 100644
--- a/usr/src/uts/common/fs/zfs/dnode.c
+++ b/usr/src/uts/common/fs/zfs/dnode.c
@@ -1552,6 +1552,72 @@ dnode_dirty_l1(dnode_t *dn, uint64_t l1blkid, dmu_tx_t *tx)
}
}
+/*
+ * Dirty all the in-core level-1 dbufs in the range specified by start_blkid
diff --git a/usr/src/uts/common/fs/zfs/dmu_send.c b/usr/src/uts/common/fs/zfs/dmu_send.c
index 01a4514..db60198 100644
--- a/usr/src/uts/common/fs/zfs/dmu_send.c
+++ b/usr/src/uts/common/fs/zfs/dmu_send.c
@@ -190,6 +190,15 @@ dump_free(dmu_sendarg_t *dsp, uint64_t object, uint64_t offset,
(object == dsp->dsa_last_data_object &&
offset > dsp->dsa_last_data_offset));
+ /*
+ * If we are doing a non-incremental send, then there can't
index b47b669e80..9868aa3020 100644
--- a/usr/src/lib/libzfs/common/libzfs_diff.c
+++ b/usr/src/lib/libzfs/common/libzfs_diff.c
@@ -359,13 +359,13 @@ describe_free(FILE *fp, differ_info_t *di, uint64_t object, char *namebuf,
if (get_stats_for_obj(di, di->fromsnap, object, namebuf,
maxlen, &sb) != 0) {
- /* Let it slide, if in the delete queue on from side */
- if (di->zerr == ENOENT && sb.zs_links == 0) {
- di->zerr = 0;
@pcd1193182
pcd1193182 / recv.diff
Created September 26, 2018 04:21
Diff between bottom half of dmu_send.c and dmu_recv.c
0a1,108
> /*
> * CDDL HEADER START
> *
> * The contents of this file are subject to the terms of the
> * Common Development and Distribution License (the "License").
> * You may not use this file except in compliance with the License.
> *
> * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
> * or http://www.opensolaris.org/os/licensing.
delphix@appliance:~$ cat thing.patch
diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c
index 6ce1d0fb6..929f15f19 100644
--- a/module/zfs/dmu_send.c
+++ b/module/zfs/dmu_send.c
@@ -2252,6 +2252,11 @@ dmu_send_impl(struct dmu_send_params *dspp)
dsl_pool_t *dp = dspp->dp;
void *tag = dspp->tag;
+ if (fromtxg != 0) {