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 zfs_netbsd_setatt...



details:   https://anonhg.NetBSD.org/src/rev/bef8392f6855
branches:  trunk
changeset: 969266:bef8392f6855
user:      hannken <hannken%NetBSD.org@localhost>
date:      Thu Feb 13 16:53:32 2020 +0000

description:
zfs_netbsd_setattr: ignore size changes on device nodes.

diffstat:

 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 9577819bf3e8 -r bef8392f6855 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Thu Feb 13 15:27:41 2020 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c    Thu Feb 13 16:53:32 2020 +0000
@@ -5575,6 +5575,9 @@
 
        zflags = VTOZ(vp)->z_pflags;
 
+       /* Ignore size changes on device nodes. */
+       if (vp->v_type == VBLK || vp->v_type == VCHR)
+               xvap.xva_vattr.va_mask &= ~AT_SIZE;
        if (vap->va_flags != VNOVAL) {
                int error;
 



Home | Main Index | Thread Index | Old Index