diff options
author | smh <smh@FreeBSD.org> | 2014-11-21 17:08:28 +0000 |
---|---|---|
committer | smh <smh@FreeBSD.org> | 2014-11-21 17:08:28 +0000 |
commit | 95f3efce798ee66d1efb2960539cee6149d60aa2 (patch) | |
tree | bcd75179c51b97979257c8bf9301690e39372893 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c | |
parent | 8273e80777c3a4960018df0b3bb35ce43281fca2 (diff) | |
download | FreeBSD-src-95f3efce798ee66d1efb2960539cee6149d60aa2.zip FreeBSD-src-95f3efce798ee66d1efb2960539cee6149d60aa2.tar.gz |
MFC r274619:
Disable TRIM on file backed ZFS vdevs and fix TRIM on init
Sponsored by: Multiplay
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c index ab492d8..ad21d6e 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c @@ -129,6 +129,8 @@ skip_open: return (error); } + vd->vdev_notrim = B_TRUE; + *max_psize = *psize = vattr.va_size; *logical_ashift = SPA_MINBLOCKSHIFT; *physical_ashift = SPA_MINBLOCKSHIFT; @@ -185,6 +187,8 @@ vdev_file_io_start(zio_t *zio) return (ZIO_PIPELINE_STOP); } + ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE); + zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ? UIO_READ : UIO_WRITE, vp, zio->io_data, zio->io_size, zio->io_offset, UIO_SYSSPACE, 0, RLIM64_INFINITY, kcred, &resid); |