Deleted Added
sdiff udiff text old ( 267138 ) new ( 269006 )
full compact
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

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

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 Pawel Jakub Dawidek <pawel@dawidek.net>.
24 * All rights reserved.
25 * Copyright (c) 2013 by Delphix. All rights reserved.
26 * Copyright (c) 2014 Joyent, Inc. All rights reserved.
27 */
28
29#include <sys/dmu.h>
30#include <sys/dmu_objset.h>
31#include <sys/dmu_tx.h>
32#include <sys/dsl_dataset.h>
33#include <sys/dsl_dir.h>

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

637 * limit are also allowed to exceed the limit.
638 */
639int
640dsl_dir_activate_fs_ss_limit(const char *ddname)
641{
642 int error;
643
644 error = dsl_sync_task(ddname, dsl_dir_actv_fs_ss_limit_check,
645 dsl_dir_actv_fs_ss_limit_sync, (void *)ddname, 0);
646
647 if (error == EALREADY)
648 error = 0;
649
650 return (error);
651}
652
653/*

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

1491{
1492 dsl_dir_set_qr_arg_t ddsqra;
1493
1494 ddsqra.ddsqra_name = ddname;
1495 ddsqra.ddsqra_source = source;
1496 ddsqra.ddsqra_value = quota;
1497
1498 return (dsl_sync_task(ddname, dsl_dir_set_quota_check,
1499 dsl_dir_set_quota_sync, &ddsqra, 0));
1500}
1501
1502int
1503dsl_dir_set_reservation_check(void *arg, dmu_tx_t *tx)
1504{
1505 dsl_dir_set_qr_arg_t *ddsqra = arg;
1506 dsl_pool_t *dp = dmu_tx_pool(tx);
1507 dsl_dataset_t *ds;

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

1612{
1613 dsl_dir_set_qr_arg_t ddsqra;
1614
1615 ddsqra.ddsqra_name = ddname;
1616 ddsqra.ddsqra_source = source;
1617 ddsqra.ddsqra_value = reservation;
1618
1619 return (dsl_sync_task(ddname, dsl_dir_set_reservation_check,
1620 dsl_dir_set_reservation_sync, &ddsqra, 0));
1621}
1622
1623static dsl_dir_t *
1624closest_common_ancestor(dsl_dir_t *ds1, dsl_dir_t *ds2)
1625{
1626 for (; ds1; ds1 = ds1->dd_parent) {
1627 dsl_dir_t *dd;
1628 for (dd = ds2; dd; dd = dd->dd_parent) {

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

1894{
1895 dsl_dir_rename_arg_t ddra;
1896
1897 ddra.ddra_oldname = oldname;
1898 ddra.ddra_newname = newname;
1899 ddra.ddra_cred = CRED();
1900
1901 return (dsl_sync_task(oldname,
1902 dsl_dir_rename_check, dsl_dir_rename_sync, &ddra, 3));
1903}
1904
1905int
1906dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd,
1907 uint64_t fs_cnt, uint64_t ss_cnt, uint64_t space, cred_t *cr)
1908{
1909 dsl_dir_t *ancestor;
1910 int64_t adelta;

--- 59 unchanged lines hidden ---