aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Dagnelie <pcd@delphix.com>2018-05-24 20:38:47 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2018-12-14 17:50:49 +0000
commit98d07d5798390bbe3817418db51afa895831e900 (patch)
treef9e959896f014c80b758b3af4074621b30059a8b
parentdc1c630b8abf2db4ce78b583b441bd0c74f42936 (diff)
downloadsrc-98d07d5798390bbe3817418db51afa895831e900.tar.gz
src-98d07d5798390bbe3817418db51afa895831e900.zip
OpenZFS 9559 - zfs diff handles files on delete queue in fromsnap poorly
Authored by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Joshua M. Clulow <josh@sysmgr.org> Reviewed by: Tom Caputi <tcaputi@datto.com> Approved by: Richard Lowe <richlowe@richlowe.net> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/9559 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d7e45412 Closes #8211
-rw-r--r--lib/libzfs/libzfs_diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c
index fb7a1fcf4196..67e85cd20468 100644
--- a/lib/libzfs/libzfs_diff.c
+++ b/lib/libzfs/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>
*/
@@ -367,13 +367,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);