diff options
author | Giuseppe Di Natale <[email protected]> | 2017-02-03 13:24:44 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-03 13:24:44 -0800 |
commit | d21d5b8248cf38d1518c9beccc350bc9081ff6be (patch) | |
tree | 0049ce696ca24c5c10051b7186d9f205153cf4fd /lib/libzfs/libzfs_dataset.c | |
parent | 9b7b9cd370ed2ec4c8ee346bcb95cb30ba7e9ba9 (diff) |
OpenZFS 4521 - zfstest is trying to execute evil "zfs unmount -a"
Authored by: Yuri Pankov <[email protected]>
Reviewed by: Andriy Gapon <[email protected]>
Reviewed by: Dan McDonald <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: John Kennedy <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
Porting Notes:
- Correctly set __ZFS_POOL_RESTRICT in inherit_001_pos
OpenZFS-issue: https://www.illumos.org/issues/4521
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8808ac5
Closes #5674
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 7c3ef744d..79c9dae6e 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -27,7 +27,7 @@ * Copyright (c) 2012 Pawel Jakub Dawidek <[email protected]>. * Copyright (c) 2013 Martin Matuska. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. */ #include <ctype.h> @@ -3053,6 +3053,15 @@ zfs_get_name(const zfs_handle_t *zhp) } /* + * Returns the name of the parent pool for the given zfs handle. + */ +const char * +zfs_get_pool_name(const zfs_handle_t *zhp) +{ + return (zhp->zpool_hdl->zpool_name); +} + +/* * Returns the type of the given zfs handle. */ zfs_type_t |