git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Illumos #2635: 'zfs rename -f' to perform force unmount
[zfs.git]
/
lib
/
libzfs
/
libzfs_dataset.c
diff --git
a/lib/libzfs/libzfs_dataset.c
b/lib/libzfs/libzfs_dataset.c
index
2d795d3
..
f216291
100644
(file)
--- a/
lib/libzfs/libzfs_dataset.c
+++ b/
lib/libzfs/libzfs_dataset.c
@@
-3760,7
+3760,8
@@
zfs_rollback(zfs_handle_t *zhp, zfs_handle_t *snap, boolean_t force)
* Renames the given dataset.
*/
int
* Renames the given dataset.
*/
int
-zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive)
+zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive,
+ boolean_t force_unmount)
{
int ret;
zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
{
int ret;
zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 };
@@
-3882,7
+3883,8
@@
zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive)
goto error;
}
} else {
goto error;
}
} else {
- if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0)) == NULL)
+ if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, 0,
+ force_unmount ? MS_FORCE : 0)) == NULL)
return (-1);
if (changelist_haszonedchild(cl)) {
return (-1);
if (changelist_haszonedchild(cl)) {