dbuf.c (263397) | dbuf.c (265740) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 7 unchanged lines hidden (view full) --- 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
24 * Copyright (c) 2013 by Delphix. All rights reserved. | 24 * Copyright (c) 2012, 2014 by Delphix. All rights reserved. |
25 * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 26 * Copyright (c) 2013, Joyent, Inc. All rights reserved. 27 */ 28 29#include <sys/zfs_context.h> 30#include <sys/dmu.h> 31#include <sys/dmu_send.h> 32#include <sys/dmu_impl.h> 33#include <sys/dbuf.h> 34#include <sys/dmu_objset.h> 35#include <sys/dsl_dataset.h> 36#include <sys/dsl_dir.h> 37#include <sys/dmu_tx.h> 38#include <sys/spa.h> 39#include <sys/zio.h> 40#include <sys/dmu_zfetch.h> 41#include <sys/sa.h> 42#include <sys/sa_impl.h> | 25 * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 26 * Copyright (c) 2013, Joyent, Inc. All rights reserved. 27 */ 28 29#include <sys/zfs_context.h> 30#include <sys/dmu.h> 31#include <sys/dmu_send.h> 32#include <sys/dmu_impl.h> 33#include <sys/dbuf.h> 34#include <sys/dmu_objset.h> 35#include <sys/dsl_dataset.h> 36#include <sys/dsl_dir.h> 37#include <sys/dmu_tx.h> 38#include <sys/spa.h> 39#include <sys/zio.h> 40#include <sys/dmu_zfetch.h> 41#include <sys/sa.h> 42#include <sys/sa_impl.h> |
43#include <sys/range_tree.h> |
|
43 44/* 45 * Number of times that zfs_free_range() took the slow path while doing 46 * a zfs receive. A nonzero value indicates a potential performance problem. 47 */ 48uint64_t zfs_free_range_recv_miss; 49 50static void dbuf_destroy(dmu_buf_impl_t *db); --- 1121 unchanged lines hidden (view full) --- 1172 /* 1173 * We could have been freed_in_flight between the dbuf_noread 1174 * and dbuf_dirty. We win, as though the dbuf_noread() had 1175 * happened after the free. 1176 */ 1177 if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID && 1178 db->db_blkid != DMU_SPILL_BLKID) { 1179 mutex_enter(&dn->dn_mtx); | 44 45/* 46 * Number of times that zfs_free_range() took the slow path while doing 47 * a zfs receive. A nonzero value indicates a potential performance problem. 48 */ 49uint64_t zfs_free_range_recv_miss; 50 51static void dbuf_destroy(dmu_buf_impl_t *db); --- 1121 unchanged lines hidden (view full) --- 1173 /* 1174 * We could have been freed_in_flight between the dbuf_noread 1175 * and dbuf_dirty. We win, as though the dbuf_noread() had 1176 * happened after the free. 1177 */ 1178 if (db->db_level == 0 && db->db_blkid != DMU_BONUS_BLKID && 1179 db->db_blkid != DMU_SPILL_BLKID) { 1180 mutex_enter(&dn->dn_mtx); |
1180 dnode_clear_range(dn, db->db_blkid, 1, tx); | 1181 if (dn->dn_free_ranges[txgoff] != NULL) { 1182 range_tree_clear(dn->dn_free_ranges[txgoff], 1183 db->db_blkid, 1); 1184 } |
1181 mutex_exit(&dn->dn_mtx); 1182 db->db_freed_in_flight = FALSE; 1183 } 1184 1185 /* 1186 * This buffer is now part of this txg 1187 */ 1188 dbuf_add_ref(db, (void *)(uintptr_t)tx->tx_txg); --- 1589 unchanged lines hidden --- | 1185 mutex_exit(&dn->dn_mtx); 1186 db->db_freed_in_flight = FALSE; 1187 } 1188 1189 /* 1190 * This buffer is now part of this txg 1191 */ 1192 dbuf_add_ref(db, (void *)(uintptr_t)tx->tx_txg); --- 1589 unchanged lines hidden --- |