svn commit: r284037 - vendor-sys/illumos/dist/uts/common/fs/zfs
Andriy Gapon
avg at FreeBSD.org
Fri Jun 5 17:07:14 UTC 2015
Author: avg
Date: Fri Jun 5 17:07:13 2015
New Revision: 284037
URL: https://svnweb.freebsd.org/changeset/base/284037
Log:
5912 full stream can not be force-received into a dataset if it has a snapshot
Author: Andriy Gapon <avg at freebsd.org>
Reviewed by: Paul Dagnelie <pcd at delphix.com>
Approved by: Dan McDonald <danmcd at omniti.com>
illumos/illumos-gate at 5bae108fe2364722de3aa86e04966a0d33fd027a
Modified:
vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c
Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:06:29 2015 (r284036)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Fri Jun 5 17:07:13 2015 (r284037)
@@ -949,10 +949,12 @@ recv_begin_check_existing_impl(dmu_recv_
dsl_dataset_rele(snap, FTAG);
} else {
- /* if full, most recent snapshot must be $ORIGIN */
- if (dsl_dataset_phys(ds)->ds_prev_snap_txg >= TXG_INITIAL)
- return (SET_ERROR(ENODEV));
- drba->drba_snapobj = dsl_dataset_phys(ds)->ds_prev_snap_obj;
+ /* if full, then must be forced */
+ if (!drba->drba_cookie->drc_force)
+ return (SET_ERROR(EEXIST));
+ /* start from $ORIGIN@$ORIGIN, if supported */
+ drba->drba_snapobj = dp->dp_origin_snap != NULL ?
+ dp->dp_origin_snap->ds_object : 0;
}
return (0);
More information about the svn-src-all
mailing list