/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/dsl_dataset.h>
#include <sys/refcount.h>
#include <sys/zfs_context.h>
#include <sys/dsl_pool.h>
/*
* Deadlist concurrency:
*
* Deadlists can only be modified from the syncing thread.
*
* Except for dsl_deadlist_insert(), it can only be modified with the
* dp_config_rwlock held with RW_WRITER.
*
* The accessors (dsl_deadlist_space() and dsl_deadlist_space_range()) can
* be called concurrently, from open context, with the dl_config_rwlock held
* with RW_READER.
*
* Therefore, we only need to provide locking between dsl_deadlist_insert() and
* the accessors, protecting:
* dl_phys->dl_used,comp,uncomp
* and protecting the dl_tree from being loaded.
* The locking is provided by dl_lock. Note that locking on the bpobj_t
* provides its own locking, and dl_oldfmt is immutable.
*/
static int
{
return (-1);
return (+1);
else
return (0);
}
static void
{
if (dl->dl_havetree)
return;
sizeof (dsl_deadlist_entry_t),
zap_cursor_advance(&zc)) {
}
}
void
{
return;
}
}
void
{
return;
}
if (dl->dl_havetree) {
!= NULL) {
}
}
}
{
sizeof (dsl_deadlist_phys_t), tx));
}
void
{
return;
}
zap_cursor_advance(&zc)) {
else
}
}
static void
{
}
}
static void
{
} else {
}
}
void
{
return;
}
else
}
/*
* Insert new key in deadlist, which must be > all current entries.
* mintxg is not inclusive.
*/
void
{
return;
}
/*
* Remove this key, merging its entries into the previous key.
*/
void
{
return;
}
/*
* Walk ds's snapshots to regenerate generate ZAP & AVL.
*/
static void
{
return;
}
while (mrs_obj != 0) {
}
}
{
return (newobj);
}
break;
}
return (newobj);
}
void
{
return;
}
}
/*
* return space used in the range (mintxg, maxtxg].
* Includes maxtxg, does not include mintxg.
* mintxg and maxtxg must both be keys in the deadlist (unless maxtxg is
* larger than any bp in the deadlist (eg. UINT64_MAX)).
*/
void
{
return;
}
/*
* If we don't find this mintxg, there shouldn't be anything
* after it either.
*/
}
}
static void
{
bpobj_close(&bpo);
}
static int
{
return (0);
}
/*
* Merge the deadlist pointed to by 'obj' into dl. obj will be left as
* an empty deadlist.
*/
void
{
bpobj_close(&bpo);
return;
}
zap_cursor_advance(&zc)) {
}
}
/*
* Remove entries on dl that are >= mintxg, and put them on the bpobj.
*/
void
{
while (dle) {
}
}