diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2017-06-08 10:10:29 +0000 |
commit | 8cb9f5acecaded019a9a55454a31dcf4328d0d1b (patch) | |
tree | 7c69e28b9b9b5ac2d9f928324a663becf2efa2d7 /usr/src/uts/common/fs | |
parent | 3a5445f1b9d90e4f1538503bd60913c8f302c17f (diff) | |
parent | 79809f9cf402f130667349b2d4007ecd65d63c6f (diff) | |
download | illumos-joyent-release-20170608.tar.gz |
[illumos-gate merge]release-20170608
commit 79809f9cf402f130667349b2d4007ecd65d63c6f
8269 dtrace stddev aggregation is normalized incorrectly
commit 22c8b9583d07895c16549075a53668d7bc988cf3
8108 zdb -l fails to read labels 2 and 3
commit 0255edcc85fc0cd1dda0e49bcd52eb66c06a1b16
8056 zfs send size estimate is inaccurate for some zvols
commit dbfd9f930004c390a2ce2cf850c71b4f880eef9c
8156 dbuf_evict_notify() does not need dbuf_evict_lock
commit 690031d326342fa4ea28b5e80f1ad6a16281519d
8168 NULL pointer dereference in zfs_create()
commit 7c4ab494ff60bbbcc0889e71388ae63e903bbf57
8276 rpcbind leaks memory due to libumem per thread caching.
commit f176a0a4cd61cbd708a7f25dc30d221f4d5902ba
8270 dnlc_reverse_lookup() is unsafe at any speed
commit 72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2
8300 fix man page issues found by mandoc 1.14.1
commit cb4d790db8fe85bce9f9647fe4e1bdc274c7af1c
8337 gss: misleading-indentation
commit f53522305c07915a44e86f2455cc62e7aac27037
8324 more: misleading-indentation
Conflicts:
usr/src/uts/common/fs/lookup.c
usr/src/man/man3c/thrd_equal.3c
Diffstat (limited to 'usr/src/uts/common/fs')
-rw-r--r-- | usr/src/uts/common/fs/dnlc.c | 15 | ||||
-rw-r--r-- | usr/src/uts/common/fs/lookup.c | 1 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dbuf.c | 18 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dmu_send.c | 15 |
4 files changed, 29 insertions, 20 deletions
diff --git a/usr/src/uts/common/fs/dnlc.c b/usr/src/uts/common/fs/dnlc.c index 32ac33c879..0ec57ff7f7 100644 --- a/usr/src/uts/common/fs/dnlc.c +++ b/usr/src/uts/common/fs/dnlc.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. * Copyright (c) 2017 by Delphix. All rights reserved. */ @@ -67,12 +68,12 @@ /* * We want to be able to identify files that are referenced only by the DNLC. * When adding a reference from the DNLC, call VN_HOLD_DNLC instead of VN_HOLD, - * since multiple DNLC references should only be counted once in v_count. This - * file contains only two(2) calls to VN_HOLD, renamed VN_HOLD_CALLER in the - * hope that no one will mistakenly add a VN_HOLD to this file. (Unfortunately - * it is not possible to #undef VN_HOLD and retain VN_HOLD_CALLER. Ideally a - * Makefile rule would grep uncommented C tokens to check that VN_HOLD is - * referenced only once in this file, to define VN_HOLD_CALLER.) + * since multiple DNLC references should only be counted once in v_count. The + * VN_HOLD macro itself is aliased to VN_HOLD_CALLER in this file to help + * differentiate the behaviors. (Unfortunately it is not possible to #undef + * VN_HOLD and retain VN_HOLD_CALLER. Ideally a Makefile rule would grep + * uncommented C tokens to check that VN_HOLD is referenced only once in this + * file, to define VN_HOLD_CALLER.) */ #define VN_HOLD_CALLER VN_HOLD #define VN_HOLD_DNLC(vp) { \ @@ -634,7 +635,7 @@ dnlc_lookup(vnode_t *dp, const char *name) * put a hold on it. */ vp = ncp->vp; - VN_HOLD_CALLER(vp); /* VN_HOLD 1 of 2 in this file */ + VN_HOLD_CALLER(vp); mutex_exit(&hp->hash_lock); ncstats.hits++; ncs.ncs_hits.value.ui64++; diff --git a/usr/src/uts/common/fs/lookup.c b/usr/src/uts/common/fs/lookup.c index 7dc83ff8d5..789509ecfb 100644 --- a/usr/src/uts/common/fs/lookup.c +++ b/usr/src/uts/common/fs/lookup.c @@ -23,6 +23,7 @@ * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright 2016 Joyent, Inc. * Copyright (c) 1988, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, Joyent, Inc. */ /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */ diff --git a/usr/src/uts/common/fs/zfs/dbuf.c b/usr/src/uts/common/fs/zfs/dbuf.c index b2e6595190..7168e848ca 100644 --- a/usr/src/uts/common/fs/zfs/dbuf.c +++ b/usr/src/uts/common/fs/zfs/dbuf.c @@ -561,19 +561,15 @@ dbuf_evict_notify(void) if (tsd_get(zfs_dbuf_evict_key) != NULL) return; + /* + * We check if we should evict without holding the dbuf_evict_lock, + * because it's OK to occasionally make the wrong decision here, + * and grabbing the lock results in massive lock contention. + */ if (refcount_count(&dbuf_cache_size) > dbuf_cache_max_bytes) { - boolean_t evict_now = B_FALSE; - - mutex_enter(&dbuf_evict_lock); - if (refcount_count(&dbuf_cache_size) > dbuf_cache_max_bytes) { - evict_now = dbuf_cache_above_hiwater(); - cv_signal(&dbuf_evict_cv); - } - mutex_exit(&dbuf_evict_lock); - - if (evict_now) { + if (dbuf_cache_above_hiwater()) dbuf_evict_one(); - } + cv_signal(&dbuf_evict_cv); } } diff --git a/usr/src/uts/common/fs/zfs/dmu_send.c b/usr/src/uts/common/fs/zfs/dmu_send.c index c9a79b94e8..92f24cd7f2 100644 --- a/usr/src/uts/common/fs/zfs/dmu_send.c +++ b/usr/src/uts/common/fs/zfs/dmu_send.c @@ -1102,10 +1102,17 @@ dmu_adjust_send_estimate_for_indirects(dsl_dataset_t *ds, uint64_t uncompressed, */ uint64_t recordsize; uint64_t record_count; + objset_t *os; + VERIFY0(dmu_objset_from_ds(ds, &os)); /* Assume all (uncompressed) blocks are recordsize. */ - err = dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_RECORDSIZE), - &recordsize); + if (os->os_phys->os_type == DMU_OST_ZVOL) { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_VOLBLOCKSIZE), &recordsize); + } else { + err = dsl_prop_get_int_ds(ds, + zfs_prop_to_name(ZFS_PROP_RECORDSIZE), &recordsize); + } if (err != 0) return (err); record_count = uncompressed / recordsize; @@ -1174,6 +1181,10 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl_dataset_t *fromds, err = dmu_adjust_send_estimate_for_indirects(ds, uncomp, comp, stream_compressed, sizep); + /* + * Add the size of the BEGIN and END records to the estimate. + */ + *sizep += 2 * sizeof (dmu_replay_record_t); return (err); } |