Deleted Added
full compact
dsl_dataset.c (229578) dsl_dataset.c (235951)
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 (c) 2011 by Delphix. 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 (c) 2011 by Delphix. All rights reserved.
24 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
24 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
25 * All rights reserved.
26 * Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
27 */
28
29#include <sys/dmu_objset.h>
30#include <sys/dsl_dataset.h>
31#include <sys/dsl_dir.h>
32#include <sys/dsl_prop.h>
33#include <sys/dsl_synctask.h>
34#include <sys/dmu_traverse.h>
25 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
26 * All rights reserved.
27 * Portions Copyright (c) 2011 Martin Matuska <mm@FreeBSD.org>
28 */
29
30#include <sys/dmu_objset.h>
31#include <sys/dsl_dataset.h>
32#include <sys/dsl_dir.h>
33#include <sys/dsl_prop.h>
34#include <sys/dsl_synctask.h>
35#include <sys/dmu_traverse.h>
36#include <sys/dmu_impl.h>
35#include <sys/dmu_tx.h>
36#include <sys/arc.h>
37#include <sys/zio.h>
38#include <sys/zap.h>
39#include <sys/unique.h>
40#include <sys/zfs_context.h>
41#include <sys/zfs_ioctl.h>
42#include <sys/spa.h>

--- 353 unchanged lines hidden (view full) ---

396 ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP);
397 ds->ds_dbuf = dbuf;
398 ds->ds_object = dsobj;
399 ds->ds_phys = dbuf->db_data;
400
401 mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL);
402 mutex_init(&ds->ds_recvlock, NULL, MUTEX_DEFAULT, NULL);
403 mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL);
37#include <sys/dmu_tx.h>
38#include <sys/arc.h>
39#include <sys/zio.h>
40#include <sys/zap.h>
41#include <sys/unique.h>
42#include <sys/zfs_context.h>
43#include <sys/zfs_ioctl.h>
44#include <sys/spa.h>

--- 353 unchanged lines hidden (view full) ---

398 ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP);
399 ds->ds_dbuf = dbuf;
400 ds->ds_object = dsobj;
401 ds->ds_phys = dbuf->db_data;
402
403 mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL);
404 mutex_init(&ds->ds_recvlock, NULL, MUTEX_DEFAULT, NULL);
405 mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL);
406 mutex_init(&ds->ds_sendstream_lock, NULL, MUTEX_DEFAULT, NULL);
407
404 rw_init(&ds->ds_rwlock, 0, 0, 0);
405 cv_init(&ds->ds_exclusive_cv, NULL, CV_DEFAULT, NULL);
406
407 bplist_create(&ds->ds_pending_deadlist);
408 dsl_deadlist_open(&ds->ds_deadlist,
409 mos, ds->ds_phys->ds_deadlist_obj);
410
408 rw_init(&ds->ds_rwlock, 0, 0, 0);
409 cv_init(&ds->ds_exclusive_cv, NULL, CV_DEFAULT, NULL);
410
411 bplist_create(&ds->ds_pending_deadlist);
412 dsl_deadlist_open(&ds->ds_deadlist,
413 mos, ds->ds_phys->ds_deadlist_obj);
414
415 list_create(&ds->ds_sendstreams, sizeof (dmu_sendarg_t),
416 offsetof(dmu_sendarg_t, dsa_link));
417
411 if (err == 0) {
412 err = dsl_dir_open_obj(dp,
413 ds->ds_phys->ds_dir_obj, NULL, ds, &ds->ds_dir);
414 }
415 if (err) {
416 mutex_destroy(&ds->ds_lock);
417 mutex_destroy(&ds->ds_recvlock);
418 mutex_destroy(&ds->ds_opening_lock);

--- 3874 unchanged lines hidden ---
418 if (err == 0) {
419 err = dsl_dir_open_obj(dp,
420 ds->ds_phys->ds_dir_obj, NULL, ds, &ds->ds_dir);
421 }
422 if (err) {
423 mutex_destroy(&ds->ds_lock);
424 mutex_destroy(&ds->ds_recvlock);
425 mutex_destroy(&ds->ds_opening_lock);

--- 3874 unchanged lines hidden ---