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) 2012, 2014 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 ZFS_SPACE_CHECK_RESERVED); |
647 648 if (error == EALREADY) 649 error = 0; 650 651 return (error); 652} 653 654/* --- 837 unchanged lines hidden (view full) --- 1492{ 1493 dsl_dir_set_qr_arg_t ddsqra; 1494 1495 ddsqra.ddsqra_name = ddname; 1496 ddsqra.ddsqra_source = source; 1497 ddsqra.ddsqra_value = quota; 1498 1499 return (dsl_sync_task(ddname, dsl_dir_set_quota_check, |
1500 dsl_dir_set_quota_sync, &ddsqra, 0, ZFS_SPACE_CHECK_NONE)); |
1501} 1502 1503int 1504dsl_dir_set_reservation_check(void *arg, dmu_tx_t *tx) 1505{ 1506 dsl_dir_set_qr_arg_t *ddsqra = arg; 1507 dsl_pool_t *dp = dmu_tx_pool(tx); 1508 dsl_dataset_t *ds; --- 104 unchanged lines hidden (view full) --- 1613{ 1614 dsl_dir_set_qr_arg_t ddsqra; 1615 1616 ddsqra.ddsqra_name = ddname; 1617 ddsqra.ddsqra_source = source; 1618 ddsqra.ddsqra_value = reservation; 1619 1620 return (dsl_sync_task(ddname, dsl_dir_set_reservation_check, |
1621 dsl_dir_set_reservation_sync, &ddsqra, 0, ZFS_SPACE_CHECK_NONE)); |
1622} 1623 1624static dsl_dir_t * 1625closest_common_ancestor(dsl_dir_t *ds1, dsl_dir_t *ds2) 1626{ 1627 for (; ds1; ds1 = ds1->dd_parent) { 1628 dsl_dir_t *dd; 1629 for (dd = ds2; dd; dd = dd->dd_parent) { --- 265 unchanged lines hidden (view full) --- 1895{ 1896 dsl_dir_rename_arg_t ddra; 1897 1898 ddra.ddra_oldname = oldname; 1899 ddra.ddra_newname = newname; 1900 ddra.ddra_cred = CRED(); 1901 1902 return (dsl_sync_task(oldname, |
1903 dsl_dir_rename_check, dsl_dir_rename_sync, &ddra, 1904 3, ZFS_SPACE_CHECK_RESERVED)); |
1905} 1906 1907int 1908dsl_dir_transfer_possible(dsl_dir_t *sdd, dsl_dir_t *tdd, 1909 uint64_t fs_cnt, uint64_t ss_cnt, uint64_t space, cred_t *cr) 1910{ 1911 dsl_dir_t *ancestor; 1912 int64_t adelta; --- 59 unchanged lines hidden --- |