mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Illumos #3740
3740 Poor ZFS send / receive performance due to snapshot
hold / release processing
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Christopher Siden <christopher.siden@delphix.com>
References:
https://www.illumos.org/issues/3740
illumos/illumos-gate@a7a845e4bf
Ported-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1775
Porting notes:
1. 13fe019870 introduced a merge conflict
in dsl_dataset_user_release_tmp where some variables were moved
outside of the preprocessor directive.
2. dea9dfefdd747534b3846845629d2200f0616dad made the previous merge
conflict worse by switching KM_SLEEP to KM_PUSHPAGE. This is notable
because this commit refactors the code, adding a new KM_SLEEP
allocation. It is not clear to me whether this should be converted
to KM_PUSHPAGE.
3. We had a merge conflict in libzfs_sendrecv.c because of copyright
notices.
4. Several small C99 compatibility fixed were made.
This commit is contained in:
committed by
Brian Behlendorf
parent
7bc7f25040
commit
95fd54a1c5
+2
-2
@@ -24,6 +24,7 @@
|
||||
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@@ -5193,8 +5194,7 @@ zfs_do_hold_rele_impl(int argc, char **argv, boolean_t holding)
|
||||
continue;
|
||||
}
|
||||
if (holding) {
|
||||
if (zfs_hold(zhp, delim+1, tag, recursive,
|
||||
B_FALSE, -1) != 0)
|
||||
if (zfs_hold(zhp, delim+1, tag, recursive, -1) != 0)
|
||||
++errors;
|
||||
} else {
|
||||
if (zfs_release(zhp, delim+1, tag, recursive) != 0)
|
||||
|
||||
+2
-1
@@ -21,6 +21,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -152,7 +153,7 @@ import_pool(const char *target, boolean_t readonly)
|
||||
g_importargs.poolname = g_pool;
|
||||
pools = zpool_search_import(g_zfs, &g_importargs);
|
||||
|
||||
if (pools == NULL || nvlist_next_nvpair(pools, NULL) == NULL) {
|
||||
if (nvlist_empty(pools)) {
|
||||
if (!g_importargs.can_be_active) {
|
||||
g_importargs.can_be_active = B_TRUE;
|
||||
if (zpool_search_import(g_zfs, &g_importargs) != NULL ||
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -4830,7 +4831,7 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id)
|
||||
|
||||
error = user_release_one(fullname, tag);
|
||||
if (error)
|
||||
fatal(0, "user_release_one(%s)", fullname, tag);
|
||||
fatal(0, "user_release_one(%s, %s) = %d", fullname, tag, error);
|
||||
|
||||
VERIFY3U(dmu_objset_hold(fullname, FTAG, &origin), ==, ENOENT);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user