summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-09-19 16:38:30 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2014-09-19 16:38:30 +0000
commit14dedfd24e58157dbc424030aa48072660f96bc8 (patch)
treec68aff6308de256b63de06dc74b40d65ed0ee963 /usr/src
parentaf24105d034d4f2b801ab39387e4adecd32f8023 (diff)
parent42fcb65ea4f2c6f8cc5a3c6142a486cb49871fd2 (diff)
downloadillumos-joyent-14dedfd24e58157dbc424030aa48072660f96bc8.tar.gz
[illumos-gate merge]
commit 42fcb65ea4f2c6f8cc5a3c6142a486cb49871fd2 5150 zfs clone of a defer_destroy snapshot causes strangeness commit f6164ad638e7346c4ae4ba393760a897cf6eb744 5174 add sdt probe for blocked read in dbuf_read() commit 655967ab7780f789dd00eece4464be60cd9aff5e 5181 nscd is extremely slow when a local file is missing commit dd3928f816b8d87f7ecc81d6ec1eec1257ed0cda 5182 use after free in blkdev
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/nsswitch/files/common/files_common.c17
-rw-r--r--usr/src/uts/common/fs/zfs/dbuf.c2
-rw-r--r--usr/src/uts/common/fs/zfs/dsl_dataset.c10
-rw-r--r--usr/src/uts/common/io/blkdev/blkdev.c2
4 files changed, 23 insertions, 8 deletions
diff --git a/usr/src/lib/nsswitch/files/common/files_common.c b/usr/src/lib/nsswitch/files/common/files_common.c
index 4b7b6753c1..4755aec86b 100644
--- a/usr/src/lib/nsswitch/files/common/files_common.c
+++ b/usr/src/lib/nsswitch/files/common/files_common.c
@@ -21,7 +21,12 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- *
+ */
+/*
+ * Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ */
+
+/*
* Common code and structures used by name-service-switch "files" backends.
*/
@@ -406,11 +411,13 @@ retry:
retries = 100;
while (stat64(be->filename, &st) < 0) {
/*
- * On a healthy system this can't happen except during brief
- * periods when the file is being modified/renamed. Keep
- * trying until things settle down, but eventually give up.
+ * This can happen only in two cases: Either the file is
+ * completely missing and we were not able to read it yet
+ * (fh_table is NULL), or there is some brief period when the
+ * file is being modified/renamed. Keep trying until things
+ * settle down, but eventually give up.
*/
- if (--retries == 0)
+ if (fhp->fh_table == NULL || --retries == 0)
goto unavail;
poll(0, 0, 100);
}
diff --git a/usr/src/uts/common/fs/zfs/dbuf.c b/usr/src/uts/common/fs/zfs/dbuf.c
index 0e97ad4bac..040b1ac313 100644
--- a/usr/src/uts/common/fs/zfs/dbuf.c
+++ b/usr/src/uts/common/fs/zfs/dbuf.c
@@ -682,6 +682,8 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio, uint32_t flags)
db->db_state == DB_FILL) {
ASSERT(db->db_state == DB_READ ||
(flags & DB_RF_HAVESTRUCT) == 0);
+ DTRACE_PROBE2(blocked__read, dmu_buf_impl_t *,
+ db, zio_t *, zio);
cv_wait(&db->db_changed, &db->db_mtx);
}
if (db->db_state == DB_UNCACHED)
diff --git a/usr/src/uts/common/fs/zfs/dsl_dataset.c b/usr/src/uts/common/fs/zfs/dsl_dataset.c
index c075c6ac3d..f1b92f3eaa 100644
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c
+++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 RackTop Systems.
*/
@@ -692,7 +692,13 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
dsphys->ds_uncompressed_bytes =
origin->ds_phys->ds_uncompressed_bytes;
dsphys->ds_bp = origin->ds_phys->ds_bp;
- dsphys->ds_flags |= origin->ds_phys->ds_flags;
+
+ /*
+ * Inherit flags that describe the dataset's contents
+ * (INCONSISTENT) or properties (Case Insensitive).
+ */
+ dsphys->ds_flags |= origin->ds_phys->ds_flags &
+ (DS_FLAG_INCONSISTENT | DS_FLAG_CI_DATASET);
dmu_buf_will_dirty(origin->ds_dbuf, tx);
origin->ds_phys->ds_num_children++;
diff --git a/usr/src/uts/common/io/blkdev/blkdev.c b/usr/src/uts/common/io/blkdev/blkdev.c
index a34aec9fdd..bd31589e56 100644
--- a/usr/src/uts/common/io/blkdev/blkdev.c
+++ b/usr/src/uts/common/io/blkdev/blkdev.c
@@ -1311,7 +1311,6 @@ bd_sched(bd_t *bd)
rv = xi->i_func(bd->d_private, &xi->i_public);
if (rv != 0) {
bp = xi->i_bp;
- bd_xfer_free(xi);
bioerror(bp, rv);
biodone(bp);
@@ -1319,6 +1318,7 @@ bd_sched(bd_t *bd)
bd->d_qactive--;
kstat_runq_exit(bd->d_kiop);
list_remove(&bd->d_runq, xi);
+ bd_xfer_free(xi);
} else {
mutex_enter(&bd->d_iomutex);
}