diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/nsswitch/files/common/files_common.c | 17 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dbuf.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/dsl_dataset.c | 10 | ||||
-rw-r--r-- | usr/src/uts/common/io/blkdev/blkdev.c | 2 |
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); } |