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
Export required vfs/vn symbols
[zfs.git]
/
module
/
zfs
/
zfs_ioctl.c
diff --git
a/module/zfs/zfs_ioctl.c
b/module/zfs/zfs_ioctl.c
index
221b1e3
..
6e8422b
100644
(file)
--- a/
module/zfs/zfs_ioctl.c
+++ b/
module/zfs/zfs_ioctl.c
@@
-3307,6
+3307,7
@@
static int
zfs_ioc_rename(zfs_cmd_t *zc)
{
boolean_t recursive = zc->zc_cookie & 1;
zfs_ioc_rename(zfs_cmd_t *zc)
{
boolean_t recursive = zc->zc_cookie & 1;
+ int err;
zc->zc_value[sizeof (zc->zc_value) - 1] = '\0';
if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 ||
zc->zc_value[sizeof (zc->zc_value) - 1] = '\0';
if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 ||
@@
-3320,13
+3321,18
@@
zfs_ioc_rename(zfs_cmd_t *zc)
*/
if (!recursive && strchr(zc->zc_name, '@') != NULL &&
zc->zc_objset_type == DMU_OST_ZFS) {
*/
if (!recursive && strchr(zc->zc_name, '@') != NULL &&
zc->zc_objset_type == DMU_OST_ZFS) {
-
int
err = zfs_unmount_snap(zc->zc_name, NULL);
+ err = zfs_unmount_snap(zc->zc_name, NULL);
if (err)
return (err);
}
if (err)
return (err);
}
- if (zc->zc_objset_type == DMU_OST_ZVOL)
+
+ err = dmu_objset_rename(zc->zc_name, zc->zc_value, recursive);
+ if ((err == 0) && (zc->zc_objset_type == DMU_OST_ZVOL)) {
(void) zvol_remove_minor(zc->zc_name);
(void) zvol_remove_minor(zc->zc_name);
- return (dmu_objset_rename(zc->zc_name, zc->zc_value, recursive));
+ (void) zvol_create_minor(zc->zc_value);
+ }
+
+ return (err);
}
static int
}
static int
@@
-4741,11
+4747,12
@@
zfs_ioc_events_next(zfs_cmd_t *zc)
return (error);
do {
return (error);
do {
- error = zfs_zevent_next(ze, &event, &dropped);
+ error = zfs_zevent_next(ze, &event,
+ &zc->zc_nvlist_dst_size, &dropped);
if (event != NULL) {
zc->zc_cookie = dropped;
error = put_nvlist(zc, event);
if (event != NULL) {
zc->zc_cookie = dropped;
error = put_nvlist(zc, event);
- nvlist_free(event);
+ nvlist_free(event);
}
if (zc->zc_guid & ZEVENT_NONBLOCK)
}
if (zc->zc_guid & ZEVENT_NONBLOCK)
@@
-5141,7
+5148,7
@@
zfsdev_compat_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
return zfsdev_ioctl(filp, cmd, arg);
}
#else
return zfsdev_ioctl(filp, cmd, arg);
}
#else
-#define zfs_compat_ioctl NULL
+#define zfs
dev
_compat_ioctl NULL
#endif
static const struct file_operations zfsdev_fops = {
#endif
static const struct file_operations zfsdev_fops = {