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 Operation zfs_ran...
details: https://anonhg.NetBSD.org/src/rev/a4e7b4d81e7c
branches: trunk
changeset: 446653:a4e7b4d81e7c
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Dec 13 10:20:20 2018 +0000
description:
Operation zfs_range_lock() needs range as (offset,length), not as (low,high).
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r d4ba6939e28c -r a4e7b4d81e7c external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Dec 13 10:19:47 2018 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Thu Dec 13 10:20:20 2018 +0000
@@ -5968,6 +5968,7 @@
znode_t *zp = VTOZ(vp);
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
rl_t *rl = NULL;
+ uint64_t len;
int error;
bool cleaned = false;
@@ -5978,7 +5979,13 @@
ZFS_VERIFY_ZP(zp);
if (cleaning) {
- rl = zfs_range_lock(zp, offlo, offhi, RL_WRITER);
+ ASSERT((offlo & PAGE_MASK) == 0 && (offhi & PAGE_MASK) == 0);
+ ASSERT(offlo < offhi || offhi == 0);
+ if (offhi == 0)
+ len = UINT64_MAX;
+ else
+ len = offhi - offlo;
+ rl = zfs_range_lock(zp, offlo, len, RL_WRITER);
tsd_set(zfs_putpage_key, &cleaned);
}
error = genfs_putpages(v);
Home |
Main Index |
Thread Index |
Old Index