Print this page
*** NO COMMENTS ***
*** 20,30 ****
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Portions Copyright 2011 Martin Matuska
! * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
/*
--- 20,30 ----
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Portions Copyright 2011 Martin Matuska
! * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
/*
*** 3170,3180 ****
zct.zct_props = nvprops;
if (cbfunc == NULL)
return (EINVAL);
! if (zfs_get_parent(name, parent, MAXNAMELEN) == 0 &&
zfs_is_wormed(parent)) {
return (EPERM);
}
if (type == DMU_OST_ZVOL) {
--- 3170,3180 ----
zct.zct_props = nvprops;
if (cbfunc == NULL)
return (EINVAL);
! if (zfs_get_parent(fsname, parent, MAXNAMELEN) == 0 &&
zfs_is_wormed(parent)) {
return (EPERM);
}
if (type == DMU_OST_ZVOL) {
*** 4186,4207 ****
if (estimate) {
error = dmu_send_estimate(tosnap, fromsnap,
&zc->zc_objset_type);
} else {
file_t *fp = getf(zc->zc_cookie);
if (fp == NULL) {
dsl_dataset_rele(ds, FTAG);
if (dsfrom)
dsl_dataset_rele(dsfrom, FTAG);
return (EBADF);
}
off = fp->f_offset;
! error = dmu_send(tosnap, fromsnap,
! zc->zc_cookie, fp->f_vnode, &off);
if (VOP_SEEK(fp->f_vnode, fp->f_offset, &off, NULL) == 0)
fp->f_offset = off;
releasef(zc->zc_cookie);
}
if (dsfrom)
--- 4186,4210 ----
if (estimate) {
error = dmu_send_estimate(tosnap, fromsnap,
&zc->zc_objset_type);
} else {
+ offset_t off_starting;
file_t *fp = getf(zc->zc_cookie);
if (fp == NULL) {
dsl_dataset_rele(ds, FTAG);
if (dsfrom)
dsl_dataset_rele(dsfrom, FTAG);
return (EBADF);
}
off = fp->f_offset;
! off_starting = off;
! error = dmu_send(tosnap, fromsnap, zc->zc_cookie, fp->f_vnode,
! &off, zc->zc_sendsize);
+ zc->zc_sendcounter = off - off_starting;
if (VOP_SEEK(fp->f_vnode, fp->f_offset, &off, NULL) == 0)
fp->f_offset = off;
releasef(zc->zc_cookie);
}
if (dsfrom)
*** 5170,5180 ****
dmu_objset_rele(fromsnap, FTAG);
return (EBADF);
}
off = fp->f_offset;
! error = dmu_send(tosnap, fromsnap, fd, fp->f_vnode, &off);
if (VOP_SEEK(fp->f_vnode, fp->f_offset, &off, NULL) == 0)
fp->f_offset = off;
releasef(fd);
if (fromsnap != NULL)
--- 5173,5183 ----
dmu_objset_rele(fromsnap, FTAG);
return (EBADF);
}
off = fp->f_offset;
! error = dmu_send(tosnap, fromsnap, fd, fp->f_vnode, &off, B_FALSE);
if (VOP_SEEK(fp->f_vnode, fp->f_offset, &off, NULL) == 0)
fp->f_offset = off;
releasef(fd);
if (fromsnap != NULL)