dsl_userhold.c (288549) | dsl_userhold.c (307122) |
---|---|
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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 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. | 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 --- 6 unchanged lines hidden (view full) --- 15 * If applicable, add the following below this CDDL HEADER, with the 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) 2012, 2014 by Delphix. All rights reserved. | 23 * Copyright (c) 2012, 2015 by Delphix. All rights reserved. |
24 * Copyright (c) 2013 Steven Hartland. All rights reserved. 25 */ 26 27#include <sys/zfs_context.h> 28#include <sys/dsl_userhold.h> 29#include <sys/dsl_dataset.h> 30#include <sys/dsl_destroy.h> 31#include <sys/dsl_synctask.h> --- 143 unchanged lines hidden (view full) --- 175 } 176 177 spa_history_log_internal_ds(ds, "hold", tx, 178 "tag=%s temp=%d refs=%llu", 179 htag, minor != 0, ds->ds_userrefs); 180} 181 182typedef struct zfs_hold_cleanup_arg { | 24 * Copyright (c) 2013 Steven Hartland. All rights reserved. 25 */ 26 27#include <sys/zfs_context.h> 28#include <sys/dsl_userhold.h> 29#include <sys/dsl_dataset.h> 30#include <sys/dsl_destroy.h> 31#include <sys/dsl_synctask.h> --- 143 unchanged lines hidden (view full) --- 175 } 176 177 spa_history_log_internal_ds(ds, "hold", tx, 178 "tag=%s temp=%d refs=%llu", 179 htag, minor != 0, ds->ds_userrefs); 180} 181 182typedef struct zfs_hold_cleanup_arg { |
183 char zhca_spaname[MAXNAMELEN]; | 183 char zhca_spaname[ZFS_MAX_DATASET_NAME_LEN]; |
184 uint64_t zhca_spa_load_guid; 185 nvlist_t *zhca_holds; 186} zfs_hold_cleanup_arg_t; 187 188static void 189dsl_dataset_user_release_onexit(void *arg) 190{ 191 zfs_hold_cleanup_arg_t *ca = arg; --- 377 unchanged lines hidden (view full) --- 569 for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; 570 pair = nvlist_next_nvpair(holds, pair)) { 571 dsl_dataset_t *ds; 572 573 dsl_pool_config_enter(tmpdp, FTAG); 574 error = dsl_dataset_hold_obj_string(tmpdp, 575 nvpair_name(pair), FTAG, &ds); 576 if (error == 0) { | 184 uint64_t zhca_spa_load_guid; 185 nvlist_t *zhca_holds; 186} zfs_hold_cleanup_arg_t; 187 188static void 189dsl_dataset_user_release_onexit(void *arg) 190{ 191 zfs_hold_cleanup_arg_t *ca = arg; --- 377 unchanged lines hidden (view full) --- 569 for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; 570 pair = nvlist_next_nvpair(holds, pair)) { 571 dsl_dataset_t *ds; 572 573 dsl_pool_config_enter(tmpdp, FTAG); 574 error = dsl_dataset_hold_obj_string(tmpdp, 575 nvpair_name(pair), FTAG, &ds); 576 if (error == 0) { |
577 char name[MAXNAMELEN]; | 577 char name[ZFS_MAX_DATASET_NAME_LEN]; |
578 dsl_dataset_name(ds, name); 579 dsl_pool_config_exit(tmpdp, FTAG); 580 dsl_dataset_rele(ds, FTAG); 581 (void) zfs_unmount_snap(name); 582 } else { 583 dsl_pool_config_exit(tmpdp, FTAG); 584 } 585 } --- 81 unchanged lines hidden --- | 578 dsl_dataset_name(ds, name); 579 dsl_pool_config_exit(tmpdp, FTAG); 580 dsl_dataset_rele(ds, FTAG); 581 (void) zfs_unmount_snap(name); 582 } else { 583 dsl_pool_config_exit(tmpdp, FTAG); 584 } 585 } --- 81 unchanged lines hidden --- |