Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs Need FOF_UPDATE_O...
details: https://anonhg.NetBSD.org/src/rev/8f04b6b0546e
branches: trunk
changeset: 447459:8f04b6b0546e
user: hannken <hannken%NetBSD.org@localhost>
date: Sat Jan 12 10:42:09 2019 +0000
description:
Need FOF_UPDATE_OFFSET to update the offset on plain files.
Running "zfs send" to plain files no longer writes garbage.
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/dmu_send.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (21 lines):
diff -r c2fc589e052e -r 8f04b6b0546e external/cddl/osnet/dist/uts/common/fs/zfs/dmu_send.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_send.c Sat Jan 12 10:41:31 2019 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/dmu_send.c Sat Jan 12 10:42:09 2019 +0000
@@ -72,6 +72,8 @@
fo_write(struct file *fp, struct uio *uio, cred_t *cred, int flags, kthread_t *thr)
{
+ if (fp->f_type == DTYPE_VNODE)
+ flags |= FOF_UPDATE_OFFSET;
return (*fp->f_ops->fo_write)(fp, &fp->f_offset, uio, cred, flags);
}
@@ -79,6 +81,8 @@
fo_read(struct file *fp, struct uio *uio, cred_t *cred, int flags, kthread_t *thr)
{
+ if (fp->f_type == DTYPE_VNODE)
+ flags |= FOF_UPDATE_OFFSET;
return (*fp->f_ops->fo_read)(fp, &fp->f_offset, uio, cred, flags);
}
#endif
Home |
Main Index |
Thread Index |
Old Index