summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
authorPaul Dagnelie <pcd@delphix.com>2018-05-24 13:38:47 -0700
committerPrakash Surya <prakash.surya@delphix.com>2018-12-13 08:14:00 -0800
commit20633e304b57bc98f70fdb194081b7023adf527b (patch)
treef47ae12f72d543851fd19f7e7950d59b67d88007 /usr/src/lib
parent2a6e99a0f1f7d22c0396e8b2ce9b9babbd1056cf (diff)
downloadillumos-joyent-20633e304b57bc98f70fdb194081b7023adf527b.tar.gz
9559 zfs diff handles files on delete queue in fromsnap poorly
Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libzfs/common/libzfs_diff.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_diff.c b/usr/src/lib/libzfs/common/libzfs_diff.c
index b47b669e80..ad1fa67f1f 100644
--- a/usr/src/lib/libzfs/common/libzfs_diff.c
+++ b/usr/src/lib/libzfs/common/libzfs_diff.c
@@ -22,7 +22,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
- * Copyright (c) 2015, 2017 by Delphix. All rights reserved.
+ * Copyright (c) 2015, 2018 by Delphix. All rights reserved.
* Copyright 2016 Joyent, Inc.
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
*/
@@ -49,7 +49,7 @@
#include "libzfs_impl.h"
#define ZDIFF_SNAPDIR "/.zfs/snapshot/"
-#define ZDIFF_SHARESDIR "/.zfs/shares/"
+#define ZDIFF_SHARESDIR "/.zfs/shares/"
#define ZDIFF_PREFIX "zfs-diff-%d"
#define ZDIFF_ADDED '+'
@@ -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;
- return (0);
- }
return (-1);
}
+ /* Don't print if in the delete queue on from side */
+ if (di->zerr == ESTALE) {
+ di->zerr = 0;
+ return (0);
+ }
print_file(fp, di, ZDIFF_REMOVED, namebuf, &sb);
return (0);