diff options
Diffstat (limited to 'usr/src/uts/common/fs')
-rw-r--r-- | usr/src/uts/common/fs/nfs/nfs4_subr.c | 19 | ||||
-rw-r--r-- | usr/src/uts/common/fs/ufs/lufs.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/zfs/vdev.c | 14 |
3 files changed, 23 insertions, 12 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs4_subr.c b/usr/src/uts/common/fs/nfs/nfs4_subr.c index edc1602e13..c14117c009 100644 --- a/usr/src/uts/common/fs/nfs/nfs4_subr.c +++ b/usr/src/uts/common/fs/nfs/nfs4_subr.c @@ -2110,8 +2110,10 @@ recov_retry: goto out; } } - va.va_type = VNON; - pva.va_type = VNON; + + pgar.n4g_va.va_type = VNON; + gar.n4g_va.va_type = VNON; + remap_lookup(np, rootvp, RML_ORDINARY, cr, &newfh, &gar, &newpfh, &pgar, &e); if (nfs4_needs_recovery(&e, FALSE, mi->mi_vfsp)) { @@ -2137,10 +2139,8 @@ recov_retry: goto out; } - if (!e.error) { - va = gar.n4g_va; - pva = pgar.n4g_va; - } + va = gar.n4g_va; + pva = pgar.n4g_va; if ((e.error != 0) || (va.va_type != VDIR)) { @@ -2173,6 +2173,13 @@ recov_retry: if (pnp != NULL) { remap_lookup(pnp, rootvp, RML_ORDINARY, cr, &newpfh, &pgar, NULL, NULL, &e); + /* + * This remap_lookup call modifies pgar. The following + * line prevents trouble when checking the va_type of + * pva later in this code. + */ + pva = pgar.n4g_va; + if (nfs4_needs_recovery(&e, FALSE, mi->mi_vfsp)) { if (need_start_op) { diff --git a/usr/src/uts/common/fs/ufs/lufs.c b/usr/src/uts/common/fs/ufs/lufs.c index 301bb09c01..43cc78219c 100644 --- a/usr/src/uts/common/fs/ufs/lufs.c +++ b/usr/src/uts/common/fs/ufs/lufs.c @@ -1492,7 +1492,7 @@ lufs_init(void) _init_top(); - if (&bio_lufs_strategy != NULL) + if (bio_lufs_strategy == NULL) bio_lufs_strategy = (void (*) (void *, buf_t *)) lufs_strategy; /* diff --git a/usr/src/uts/common/fs/zfs/vdev.c b/usr/src/uts/common/fs/zfs/vdev.c index 1af113e2e0..ad460fdf92 100644 --- a/usr/src/uts/common/fs/zfs/vdev.c +++ b/usr/src/uts/common/fs/zfs/vdev.c @@ -1237,12 +1237,16 @@ vdev_open(vdev_t *vd) vd->vdev_ashift = MAX(ashift, vd->vdev_ashift); } else { /* - * Make sure the alignment requirement hasn't increased. + * Detect if the alignment requirement has increased. + * We don't want to make the pool unavailable, just + * issue a warning instead. */ - if (ashift > vd->vdev_top->vdev_ashift) { - vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN, - VDEV_AUX_BAD_LABEL); - return (EINVAL); + if (ashift > vd->vdev_top->vdev_ashift && + vd->vdev_ops->vdev_op_leaf) { + cmn_err(CE_WARN, + "Disk, '%s', has a block alignment that is " + "larger than the pool's alignment\n", + vd->vdev_path); } } |