aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-06-03 20:40:32 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-06-03 20:40:32 +0000
commiteb106113c2421dd13c4325e13dadcba8f17ad135 (patch)
treef97af8cb85f01b2a7ca563a98383840a3818aade /cddl/contrib/opensolaris/lib
parent07a5c938c9a398011f57a2cfe73feb264d4c1a3c (diff)
parent3705c6e18fce48f932fe6c90312453fd9bebcb56 (diff)
downloadsrc-eb106113c2421dd13c4325e13dadcba8f17ad135.tar.gz
src-eb106113c2421dd13c4325e13dadcba8f17ad135.zip
MFV r348580: 9559 zfs diff handles files on delete queue in fromsnap poorly
illumos/illumos-gate@20633e304b57bc98f70fdb194081b7023adf527b Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Paul Dagnelie <pcd@delphix.com>
Notes
Notes: svn path=/head/; revision=348581
Diffstat (limited to 'cddl/contrib/opensolaris/lib')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
index f1ba2effd238..26524e78086c 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
+++ b/cddl/contrib/opensolaris/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>
*/
@@ -47,7 +47,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 '+'
@@ -361,13 +361,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);