Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2018 21:31:24 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r337014 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor/illumos/dist/cmd/zdb vendor/illumos/dist/lib/libzfs/common
Message-ID:  <201807312131.w6VLVOtP053109@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Jul 31 21:31:24 2018
New Revision: 337014
URL: https://svnweb.freebsd.org/changeset/base/337014

Log:
  9421 zdb should detect and print out the number of "leaked" objects
  9422 zfs diff and zdb should explicitly mark objects that are on the deleted queue
  
  illumos/illumos-gate@20b5dafb425396adaebd0267d29e1026fc4dc413
  
  Reviewed by: Matt Ahrens <matt@delphix.com>
  Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
  Approved by: Matt Ahrens <mahrens@delphix.com>
  Author:     Paul Dagnelie <pcd@delphix.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c

Changes in other areas also in this revision:
Modified:
  vendor/illumos/dist/cmd/zdb/zdb.c
  vendor/illumos/dist/lib/libzfs/common/libzfs_diff.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c	Tue Jul 31 21:26:03 2018	(r337013)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_znode.c	Tue Jul 31 21:31:24 2018	(r337014)
@@ -2036,6 +2036,17 @@ zfs_obj_to_path_impl(objset_t *osp, uint64_t obj, sa_h
 	*path = '\0';
 	sa_hdl = hdl;
 
+	uint64_t deleteq_obj;
+	VERIFY0(zap_lookup(osp, MASTER_NODE_OBJ,
+	    ZFS_UNLINKED_SET, sizeof (uint64_t), 1, &deleteq_obj));
+	error = zap_lookup_int(osp, deleteq_obj, obj);
+	if (error == 0) {
+		return (ESTALE);
+	} else if (error != ENOENT) {
+		return (error);
+	}
+	error = 0;
+
 	for (;;) {
 		uint64_t pobj;
 		char component[MAXNAMELEN + 2];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807312131.w6VLVOtP053109>