mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +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
+1
-14
@@ -28,6 +28,7 @@
|
||||
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
||||
* Copyright (c) 201i3 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
|
||||
* Copyright (c) 2013 Steven Hartland. All rights reserved.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -4867,20 +4868,6 @@ zfs_ioc_get_holds(const char *snapname, nvlist_t *args, nvlist_t *outnvl)
|
||||
static int
|
||||
zfs_ioc_release(const char *pool, nvlist_t *holds, nvlist_t *errlist)
|
||||
{
|
||||
nvpair_t *pair;
|
||||
int err;
|
||||
|
||||
/*
|
||||
* The release may cause the snapshot to be destroyed; make sure it
|
||||
* is not mounted.
|
||||
*/
|
||||
for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL;
|
||||
pair = nvlist_next_nvpair(holds, pair)) {
|
||||
err = zfs_unmount_snap(nvpair_name(pair));
|
||||
if (err != 0)
|
||||
return (err);
|
||||
}
|
||||
|
||||
return (dsl_dataset_user_release(holds, errlist));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user