diff options
author | Steven Hartland <[email protected]> | 2013-05-25 02:06:23 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-04 11:17:48 -0800 |
commit | 95fd54a1c5b93bb2aa3e7dffc28c784b1e21a8bb (patch) | |
tree | 601d05db488f2e7ea24913dfa4028681928d64eb /include | |
parent | 7bc7f25040e68d6094a6c46fc300a3c4d66d2970 (diff) |
Illumos #3740
3740 Poor ZFS send / receive performance due to snapshot
hold / release processing
Reviewed by: Matthew Ahrens <[email protected]>
Approved by: Christopher Siden <[email protected]>
References:
https://www.illumos.org/issues/3740
illumos/illumos-gate@a7a845e4bf22fd1b2a284729ccd95c7370a0438c
Ported-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #1775
Porting notes:
1. 13fe019870c8779bf2f5b3ff731b512cf89133ef 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.
Diffstat (limited to 'include')
-rw-r--r-- | include/libzfs.h | 4 | ||||
-rw-r--r-- | include/sys/dsl_dataset.h | 3 | ||||
-rw-r--r-- | include/sys/dsl_userhold.h | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index c212a0c05..5fabcb1b1 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -24,6 +24,7 @@ * Copyright 2011 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. */ #ifndef _LIBZFS_H @@ -614,7 +615,8 @@ extern int zfs_send(zfs_handle_t *, const char *, const char *, extern int zfs_promote(zfs_handle_t *); extern int zfs_hold(zfs_handle_t *, const char *, const char *, - boolean_t, boolean_t, int); + boolean_t, int); +extern int zfs_hold_nvl(zfs_handle_t *, int, nvlist_t *); extern int zfs_release(zfs_handle_t *, const char *, const char *, boolean_t); extern int zfs_get_holds(zfs_handle_t *, nvlist_t **); extern uint64_t zvol_volsize_to_reservation(uint64_t, nvlist_t *); diff --git a/include/sys/dsl_dataset.h b/include/sys/dsl_dataset.h index 494f11b90..725f0d233 100644 --- a/include/sys/dsl_dataset.h +++ b/include/sys/dsl_dataset.h @@ -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 (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 Steven Hartland. All rights reserved. */ #ifndef _SYS_DSL_DATASET_H @@ -187,8 +188,6 @@ int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj, void dsl_dataset_disown(dsl_dataset_t *ds, void *tag); void dsl_dataset_name(dsl_dataset_t *ds, char *name); boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, void *tag); -void dsl_register_onexit_hold_cleanup(dsl_dataset_t *ds, const char *htag, - minor_t minor); uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname, dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *); uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin, diff --git a/include/sys/dsl_userhold.h b/include/sys/dsl_userhold.h index 56c6c8f47..071aeb86d 100644 --- a/include/sys/dsl_userhold.h +++ b/include/sys/dsl_userhold.h @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. 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. */ #ifndef _SYS_DSL_USERHOLD_H @@ -43,8 +44,7 @@ int dsl_dataset_user_hold(nvlist_t *holds, minor_t cleanup_minor, nvlist_t *errlist); int dsl_dataset_user_release(nvlist_t *holds, nvlist_t *errlist); int dsl_dataset_get_holds(const char *dsname, nvlist_t *nvl); -void dsl_dataset_user_release_tmp(struct dsl_pool *dp, uint64_t dsobj, - const char *htag); +void dsl_dataset_user_release_tmp(struct dsl_pool *dp, nvlist_t *holds); int dsl_dataset_user_hold_check_one(struct dsl_dataset *ds, const char *htag, boolean_t temphold, struct dmu_tx *tx); void dsl_dataset_user_hold_sync_one(struct dsl_dataset *ds, const char *htag, |