diff options
author | Joyce McIntosh <joyce.mcintosh@nexenta.com> | 2018-03-01 10:18:07 -0800 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-12-02 16:53:49 -0500 |
commit | b8dc1b43d204b714c2fda8dd4efd67de0c671db6 (patch) | |
tree | d872e81b172805b6e375de9b9c9de34f3930be84 /usr/src/lib/libshare/common/libshare.c | |
parent | 69d9b1c5b0824b6e4feadaf289d68d945f0fbe6f (diff) | |
download | illumos-gate-b8dc1b43d204b714c2fda8dd4efd67de0c671db6.tar.gz |
11945 pool import performance regression due to repeated libshare initialization
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/lib/libshare/common/libshare.c')
-rw-r--r-- | usr/src/lib/libshare/common/libshare.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/usr/src/lib/libshare/common/libshare.c b/usr/src/lib/libshare/common/libshare.c index 5a58e0268e..a507e8a1a5 100644 --- a/usr/src/lib/libshare/common/libshare.c +++ b/usr/src/lib/libshare/common/libshare.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2018 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2016 by Delphix. All rights reserved. */ @@ -1153,6 +1153,20 @@ sa_fini(sa_handle_t handle) } /* + * sa_service(sa_handle_t handle) + * + * Returns the service for which the handle is currently initialized. + */ +int +sa_service(sa_handle_t handle) +{ + if (handle == NULL) + return (0); + + return (((sa_handle_impl_t)handle)->sa_service); +} + +/* * sa_get_protocols(char **protocol) * Get array of protocols that are supported * Returns pointer to an allocated and NULL terminated |