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>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/dnode_sync.c
          +++ new/usr/src/uts/common/fs/zfs/dnode_sync.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2014 Nexenta Systems, Inc. All rights reserved.
  24   25   * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  25   26   * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  26   27   */
  27   28  
  28   29  #include <sys/zfs_context.h>
  29   30  #include <sys/dbuf.h>
  30   31  #include <sys/dnode.h>
  31   32  #include <sys/dmu.h>
  32   33  #include <sys/dmu_tx.h>
  33   34  #include <sys/dmu_objset.h>
↓ open down ↓ 356 lines elided ↑ open up ↑
 390  391  
 391  392          mutex_exit(&dn->dn_mtx);
 392  393          dnode_sync_free_range_impl(dn, blkid, nblks, dsfra->dsfra_tx);
 393  394          mutex_enter(&dn->dn_mtx);
 394  395  }
 395  396  
 396  397  /*
 397  398   * Try to kick all the dnode's dbufs out of the cache...
 398  399   */
 399  400  void
 400      -dnode_evict_dbufs(dnode_t *dn)
      401 +dnode_evict_dbufs(dnode_t *dn, int level)
 401  402  {
 402  403          dmu_buf_impl_t db_marker;
 403  404          dmu_buf_impl_t *db, *db_next;
 404  405  
 405  406          mutex_enter(&dn->dn_dbufs_mtx);
 406  407          for (db = avl_first(&dn->dn_dbufs); db != NULL; db = db_next) {
 407  408  
 408  409  #ifdef  DEBUG
 409  410                  DB_DNODE_ENTER(db);
 410  411                  ASSERT3P(DB_DNODE(db), ==, dn);
 411  412                  DB_DNODE_EXIT(db);
 412  413  #endif  /* DEBUG */
 413  414  
 414  415                  mutex_enter(&db->db_mtx);
      416 +                if (level != DBUF_EVICT_ALL && db->db_level != level) {
      417 +                        mutex_exit(&db->db_mtx);
      418 +                        db_next = AVL_NEXT(&dn->dn_dbufs, db);
      419 +                        continue;
      420 +                }
      421 +
 415  422                  if (db->db_state != DB_EVICTING &&
 416  423                      refcount_is_zero(&db->db_holds)) {
 417  424                          db_marker.db_level = db->db_level;
 418  425                          db_marker.db_blkid = db->db_blkid;
 419  426                          db_marker.db_state = DB_SEARCH;
 420  427                          avl_insert_here(&dn->dn_dbufs, &db_marker, db,
 421  428                              AVL_BEFORE);
 422  429  
 423  430                          dbuf_destroy(db);
 424  431  
↓ open down ↓ 65 lines elided ↑ open up ↑
 490  497          ASSERT(dmu_tx_is_syncing(tx));
 491  498  
 492  499          /*
 493  500           * Our contents should have been freed in dnode_sync() by the
 494  501           * free range record inserted by the caller of dnode_free().
 495  502           */
 496  503          ASSERT0(DN_USED_BYTES(dn->dn_phys));
 497  504          ASSERT(BP_IS_HOLE(dn->dn_phys->dn_blkptr));
 498  505  
 499  506          dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]);
 500      -        dnode_evict_dbufs(dn);
      507 +        dnode_evict_dbufs(dn, DBUF_EVICT_ALL);
      508 +        ASSERT(avl_is_empty(&dn->dn_dbufs));
 501  509  
 502  510          /*
 503  511           * XXX - It would be nice to assert this, but we may still
 504  512           * have residual holds from async evictions from the arc...
 505  513           *
 506  514           * zfs_obj_to_path() also depends on this being
 507  515           * commented out.
 508  516           *
 509  517           * ASSERT3U(refcount_count(&dn->dn_holds), ==, 1);
 510  518           */
↓ open down ↓ 218 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX