dsl_destroy.c (268123) | dsl_destroy.c (268473) |
---|---|
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 --- 492 unchanged lines hidden (view full) --- 501 502 dsda.dsda_snaps = snaps; 503 dsda.dsda_successful_snaps = fnvlist_alloc(); 504 dsda.dsda_defer = defer; 505 dsda.dsda_errlist = errlist; 506 507 error = dsl_sync_task(nvpair_name(pair), 508 dsl_destroy_snapshot_check, dsl_destroy_snapshot_sync, | 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 --- 492 unchanged lines hidden (view full) --- 501 502 dsda.dsda_snaps = snaps; 503 dsda.dsda_successful_snaps = fnvlist_alloc(); 504 dsda.dsda_defer = defer; 505 dsda.dsda_errlist = errlist; 506 507 error = dsl_sync_task(nvpair_name(pair), 508 dsl_destroy_snapshot_check, dsl_destroy_snapshot_sync, |
509 &dsda, 0); | 509 &dsda, 0, ZFS_SPACE_CHECK_NONE); |
510 fnvlist_free(dsda.dsda_successful_snaps); 511 512 return (error); 513} 514 515int 516dsl_destroy_snapshot(const char *name, boolean_t defer) 517{ --- 376 unchanged lines hidden (view full) --- 894 spa_close(spa, FTAG); 895 896 ddha.ddha_name = name; 897 898 if (!isenabled) { 899 objset_t *os; 900 901 error = dsl_sync_task(name, dsl_destroy_head_check, | 510 fnvlist_free(dsda.dsda_successful_snaps); 511 512 return (error); 513} 514 515int 516dsl_destroy_snapshot(const char *name, boolean_t defer) 517{ --- 376 unchanged lines hidden (view full) --- 894 spa_close(spa, FTAG); 895 896 ddha.ddha_name = name; 897 898 if (!isenabled) { 899 objset_t *os; 900 901 error = dsl_sync_task(name, dsl_destroy_head_check, |
902 dsl_destroy_head_begin_sync, &ddha, 0); | 902 dsl_destroy_head_begin_sync, &ddha, 903 0, ZFS_SPACE_CHECK_NONE); |
903 if (error != 0) 904 return (error); 905 906 /* 907 * Head deletion is processed in one txg on old pools; 908 * remove the objects from open context so that the txg sync 909 * is not too long. 910 */ --- 7 unchanged lines hidden (view full) --- 918 (void) dmu_free_long_object(os, obj); 919 /* sync out all frees */ 920 txg_wait_synced(dmu_objset_pool(os), 0); 921 dmu_objset_disown(os, FTAG); 922 } 923 } 924 925 return (dsl_sync_task(name, dsl_destroy_head_check, | 904 if (error != 0) 905 return (error); 906 907 /* 908 * Head deletion is processed in one txg on old pools; 909 * remove the objects from open context so that the txg sync 910 * is not too long. 911 */ --- 7 unchanged lines hidden (view full) --- 919 (void) dmu_free_long_object(os, obj); 920 /* sync out all frees */ 921 txg_wait_synced(dmu_objset_pool(os), 0); 922 dmu_objset_disown(os, FTAG); 923 } 924 } 925 926 return (dsl_sync_task(name, dsl_destroy_head_check, |
926 dsl_destroy_head_sync, &ddha, 0)); | 927 dsl_destroy_head_sync, &ddha, 0, ZFS_SPACE_CHECK_NONE)); |
927} 928 929/* 930 * Note, this function is used as the callback for dmu_objset_find(). We 931 * always return 0 so that we will continue to find and process 932 * inconsistent datasets, even if we encounter an error trying to 933 * process one of them. 934 */ --- 14 unchanged lines hidden --- | 928} 929 930/* 931 * Note, this function is used as the callback for dmu_objset_find(). We 932 * always return 0 so that we will continue to find and process 933 * inconsistent datasets, even if we encounter an error trying to 934 * process one of them. 935 */ --- 14 unchanged lines hidden --- |