libzfs_core.c (251646) | libzfs_core.c (252219) |
---|---|
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 --- 288 unchanged lines hidden (view full) --- 297 * If 'defer' is not set, and a snapshot has user holds or clones, the 298 * destroy operation will fail and none of the snapshots will be 299 * destroyed. 300 * 301 * If 'defer' is set, and a snapshot has user holds or clones, it will be 302 * marked for deferred destruction, and will be destroyed when the last hold 303 * or clone is removed/destroyed. 304 * | 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 --- 288 unchanged lines hidden (view full) --- 297 * If 'defer' is not set, and a snapshot has user holds or clones, the 298 * destroy operation will fail and none of the snapshots will be 299 * destroyed. 300 * 301 * If 'defer' is set, and a snapshot has user holds or clones, it will be 302 * marked for deferred destruction, and will be destroyed when the last hold 303 * or clone is removed/destroyed. 304 * |
305 * The return value will be ENOENT if none of the snapshots existed. 306 * | |
307 * The return value will be 0 if all snapshots were destroyed (or marked for | 305 * The return value will be 0 if all snapshots were destroyed (or marked for |
308 * later destruction if 'defer' is set) or didn't exist to begin with and 309 * at least one snapshot was destroyed. | 306 * later destruction if 'defer' is set) or didn't exist to begin with. |
310 * 311 * Otherwise the return value will be the errno of a (unspecified) snapshot 312 * that failed, no snapshots will be destroyed, and the errlist will have an 313 * entry for each snapshot that failed. The value in the errlist will be 314 * the (int32) error code. 315 */ 316int 317lzc_destroy_snaps(nvlist_t *snaps, boolean_t defer, nvlist_t **errlist) --- 74 unchanged lines hidden (view full) --- 392 * 393 * If cleanup_fd is not -1, it must be the result of open("/dev/zfs", O_EXCL). 394 * In this case, when the cleanup_fd is closed (including on process 395 * termination), the holds will be released. If the system is shut down 396 * uncleanly, the holds will be released when the pool is next opened 397 * or imported. 398 * 399 * Holds for snapshots which don't exist will be skipped and have an entry | 307 * 308 * Otherwise the return value will be the errno of a (unspecified) snapshot 309 * that failed, no snapshots will be destroyed, and the errlist will have an 310 * entry for each snapshot that failed. The value in the errlist will be 311 * the (int32) error code. 312 */ 313int 314lzc_destroy_snaps(nvlist_t *snaps, boolean_t defer, nvlist_t **errlist) --- 74 unchanged lines hidden (view full) --- 389 * 390 * If cleanup_fd is not -1, it must be the result of open("/dev/zfs", O_EXCL). 391 * In this case, when the cleanup_fd is closed (including on process 392 * termination), the holds will be released. If the system is shut down 393 * uncleanly, the holds will be released when the pool is next opened 394 * or imported. 395 * 396 * Holds for snapshots which don't exist will be skipped and have an entry |
400 * added to errlist, but will not cause an overall failure, except in the 401 * case that all holds where skipped. | 397 * added to errlist, but will not cause an overall failure. |
402 * | 398 * |
403 * The return value will be ENOENT if none of the snapshots for the requested 404 * holds existed. | 399 * The return value will be 0 if all holds, for snapshots that existed, 400 * were succesfully created. |
405 * | 401 * |
406 * The return value will be 0 if the nvl holds was empty or all holds, for 407 * snapshots that existed, were succesfully created and at least one hold 408 * was created. 409 * | |
410 * Otherwise the return value will be the errno of a (unspecified) hold that 411 * failed and no holds will be created. 412 * 413 * In all cases the errlist will have an entry for each hold that failed 414 * (name = snapshot), with its value being the error code (int32). 415 */ 416int 417lzc_hold(nvlist_t *holds, int cleanup_fd, nvlist_t **errlist) --- 26 unchanged lines hidden (view full) --- 444 * any clones, and all the user holds are removed, then the snapshot will be 445 * destroyed. 446 * 447 * The keys in the nvlist are snapshot names. 448 * The snapshots must all be in the same pool. 449 * The value is a nvlist whose keys are the holds to remove. 450 * 451 * Holds which failed to release because they didn't exist will have an entry | 402 * Otherwise the return value will be the errno of a (unspecified) hold that 403 * failed and no holds will be created. 404 * 405 * In all cases the errlist will have an entry for each hold that failed 406 * (name = snapshot), with its value being the error code (int32). 407 */ 408int 409lzc_hold(nvlist_t *holds, int cleanup_fd, nvlist_t **errlist) --- 26 unchanged lines hidden (view full) --- 436 * any clones, and all the user holds are removed, then the snapshot will be 437 * destroyed. 438 * 439 * The keys in the nvlist are snapshot names. 440 * The snapshots must all be in the same pool. 441 * The value is a nvlist whose keys are the holds to remove. 442 * 443 * Holds which failed to release because they didn't exist will have an entry |
452 * added to errlist, but will not cause an overall failure, except in the 453 * case that all releases where skipped. | 444 * added to errlist, but will not cause an overall failure. |
454 * | 445 * |
455 * The return value will be ENOENT if none of the specified holds existed. 456 * | |
457 * The return value will be 0 if the nvl holds was empty or all holds that | 446 * The return value will be 0 if the nvl holds was empty or all holds that |
458 * existed, were successfully removed and at least one hold was removed. | 447 * existed, were successfully removed. |
459 * 460 * Otherwise the return value will be the errno of a (unspecified) hold that 461 * failed to release and no holds will be released. 462 * 463 * In all cases the errlist will have an entry for each hold that failed to 464 * to release. 465 */ 466int --- 175 unchanged lines hidden --- | 448 * 449 * Otherwise the return value will be the errno of a (unspecified) hold that 450 * failed to release and no holds will be released. 451 * 452 * In all cases the errlist will have an entry for each hold that failed to 453 * to release. 454 */ 455int --- 175 unchanged lines hidden --- |