mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
OpenZFS 7448 - ZFS doesn't notice when disk vdevs have no write cache
Authored by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Reviewed by: Dan Fields <dan.fields@nexenta.com> Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Reviewed-by: Don Brady <don.brady@intel.com> Reviewed-by: Tim Chase <tim@chase2k.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/7448 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/295438b Closes #5737
This commit is contained in:
parent
0a252daed3
commit
298ec40b6d
@ -693,8 +693,6 @@ vdev_disk_io_start(zio_t *zio)
|
||||
return;
|
||||
|
||||
zio->io_error = error;
|
||||
if (error == ENOTSUP)
|
||||
v->vdev_nowritecache = B_TRUE;
|
||||
|
||||
break;
|
||||
|
||||
|
@ -3393,6 +3393,16 @@ zio_vdev_io_assess(zio_t *zio)
|
||||
vd->vdev_cant_write = B_TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If a cache flush returns ENOTSUP or ENOTTY, we know that no future
|
||||
* attempts will ever succeed. In this case we set a persistent bit so
|
||||
* that we don't bother with it in the future.
|
||||
*/
|
||||
if ((zio->io_error == ENOTSUP || zio->io_error == ENOTTY) &&
|
||||
zio->io_type == ZIO_TYPE_IOCTL &&
|
||||
zio->io_cmd == DKIOCFLUSHWRITECACHE && vd != NULL)
|
||||
vd->vdev_nowritecache = B_TRUE;
|
||||
|
||||
if (zio->io_error)
|
||||
zio->io_pipeline = ZIO_INTERLOCK_PIPELINE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user