svn commit: r297506 - vendor-sys/illumos/dist/uts/common/fs/zfs
Alexander Motin
mav at FreeBSD.org
Sat Apr 2 08:25:42 UTC 2016
Author: mav
Date: Sat Apr 2 08:25:41 2016
New Revision: 297506
URL: https://svnweb.freebsd.org/changeset/base/297506
Log:
6738 zfs send stream padding needs documentation
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel at delphix.com>
Reviewed by: Paul Dagnelie <pcd at delphix.com>
Reviewed by: Dan McDonald <danmcd at omniti.com>
Approved by: Robert Mustacchi <rm at joyent.com>
Author: Eli Rosenthal <eli.rosenthal at delphix.com>
illumos/illumos-gate at c20404ff77119516354b0d112d28b7ea0dadd303
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 Sat Apr 2 08:24:23 2016 (r297505)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Sat Apr 2 08:25:41 2016 (r297506)
@@ -96,6 +96,19 @@ dump_bytes(dmu_sendarg_t *dsp, void *buf
{
dsl_dataset_t *ds = dmu_objset_ds(dsp->dsa_os);
ssize_t resid; /* have to get resid to get detailed errno */
+
+ /*
+ * The code does not rely on this (len being a multiple of 8). We keep
+ * this assertion because of the corresponding assertion in
+ * receive_read(). Keeping this assertion ensures that we do not
+ * inadvertently break backwards compatibility (causing the assertion
+ * in receive_read() to trigger on old software).
+ *
+ * Removing the assertions could be rolled into a new feature that uses
+ * data that isn't 8-byte aligned; if the assertions were removed, a
+ * feature flag would have to be added.
+ */
+
ASSERT0(len % 8);
dsp->dsa_err = vn_rdwr(UIO_WRITE, dsp->dsa_vp,
@@ -1758,7 +1771,10 @@ receive_read(struct receive_arg *ra, int
{
int done = 0;
- /* some things will require 8-byte alignment, so everything must */
+ /*
+ * The code doesn't rely on this (lengths being multiples of 8). See
+ * comment in dump_bytes.
+ */
ASSERT0(len % 8);
while (done < len) {
More information about the svn-src-all
mailing list