mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Avoid retrieving unused snapshot props
This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it to take input parameters that alter the way looping through the list of snapshots is performed. The idea here is to restrict functions that throw away some of the snapshots returned by the ioctl to a range of snapshots that these functions actually use. This improves efficiency and execution speed for some rollback and send operations. Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Alek Pinchuk <apinchuk@datto.com> Closes #8077
This commit is contained in:
@@ -25,8 +25,8 @@
|
||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013, 2017 Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 Integros [integros.com]
|
||||
* Copyright (c) 2017 Datto Inc.
|
||||
* Copyright (c) 2017, Intel Corporation.
|
||||
* Copyright (c) 2019 Datto Inc.
|
||||
*/
|
||||
|
||||
/* Portions Copyright 2010 Robert Milkowski */
|
||||
@@ -1076,7 +1076,7 @@ typedef enum pool_initialize_func {
|
||||
* is passed between kernel and userland as an nvlist uint64 array.
|
||||
*/
|
||||
typedef struct ddt_object {
|
||||
uint64_t ddo_count; /* number of elements in ddt */
|
||||
uint64_t ddo_count; /* number of elements in ddt */
|
||||
uint64_t ddo_dspace; /* size of ddt on disk */
|
||||
uint64_t ddo_mspace; /* size of ddt in-core */
|
||||
} ddt_object_t;
|
||||
@@ -1123,6 +1123,13 @@ typedef enum {
|
||||
VDEV_INITIALIZE_COMPLETE
|
||||
} vdev_initializing_state_t;
|
||||
|
||||
/*
|
||||
* nvlist name constants. Facilitate restricting snapshot iteration range for
|
||||
* the "list next snapshot" ioctl
|
||||
*/
|
||||
#define SNAP_ITER_MIN_TXG "snap_iter_min_txg"
|
||||
#define SNAP_ITER_MAX_TXG "snap_iter_max_txg"
|
||||
|
||||
/*
|
||||
* /dev/zfs ioctl numbers.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user