Print this page
NEX-9752 backport illumos 6950 ARC should cache compressed data
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
6950 ARC should cache compressed data
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
6267 dn_bonus evicted too early
Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
NEX-4582 update wrc test cases for allow to use write back cache per tree of datasets
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Alex Aizman <alex.aizman@nexenta.com>
5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
NEX-1823 Slow performance doing of a large dataset
5911 ZFS "hangs" while deleting file
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Bayard Bell <bayard.bell@nexenta.com>
NEX-3266 5630 stale bonus buffer in recycled dnode_t leads to data corruption
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Will Andrews <will@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan Fields <dan.fields@nexenta.com>
SUP-507 Delete or truncate of large files delayed on datasets with small recordsize
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Ilya Usvyatsky <ilya.usvyatsky@nexenta.com>
Reviewed by: Tony Nguyen <tony.nguyen@nexenta.com>
4370 avoid transmitting holes during zfs send
4371 DMU code clean up
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Approved by: Garrett D'Amore <garrett@damore.org>

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  */
 
 #include <sys/zfs_context.h>

@@ -395,11 +396,11 @@
 
 /*
  * Try to kick all the dnode's dbufs out of the cache...
  */
 void
-dnode_evict_dbufs(dnode_t *dn)
+dnode_evict_dbufs(dnode_t *dn, int level)
 {
         dmu_buf_impl_t db_marker;
         dmu_buf_impl_t *db, *db_next;
 
         mutex_enter(&dn->dn_dbufs_mtx);

@@ -410,10 +411,16 @@
                 ASSERT3P(DB_DNODE(db), ==, dn);
                 DB_DNODE_EXIT(db);
 #endif  /* DEBUG */
 
                 mutex_enter(&db->db_mtx);
+                if (level != DBUF_EVICT_ALL && db->db_level != level) {
+                        mutex_exit(&db->db_mtx);
+                        db_next = AVL_NEXT(&dn->dn_dbufs, db);
+                        continue;
+                }
+
                 if (db->db_state != DB_EVICTING &&
                     refcount_is_zero(&db->db_holds)) {
                         db_marker.db_level = db->db_level;
                         db_marker.db_blkid = db->db_blkid;
                         db_marker.db_state = DB_SEARCH;

@@ -495,11 +502,12 @@
          */
         ASSERT0(DN_USED_BYTES(dn->dn_phys));
         ASSERT(BP_IS_HOLE(dn->dn_phys->dn_blkptr));
 
         dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]);
-        dnode_evict_dbufs(dn);
+        dnode_evict_dbufs(dn, DBUF_EVICT_ALL);
+        ASSERT(avl_is_empty(&dn->dn_dbufs));
 
         /*
          * XXX - It would be nice to assert this, but we may still
          * have residual holds from async evictions from the arc...
          *