/[base]
ViewVC logotype

Revision 240868


Jump to revision: Previous Next
Author: pjd
Date: Sun Sep 23 19:40:58 2012 UTC (9 years, 7 months ago)
Changed paths: 19
Log Message:
Add TRIM support.

The code builds a map of regions that were freed. On every write the
code consults the map and eventually removes ranges that were freed
before, but are now overwritten.

Freed blocks are not TRIMed immediately. There is a tunable that defines
how many txg we should wait with TRIMming freed blocks (64 by default).

There is a low priority thread that TRIMs ranges when the time comes.
During TRIM we keep in-flight ranges on a list to detect colliding
writes - we have to delay writes that collide with in-flight TRIMs in
case something will be reordered and write will reached the disk before
the TRIM. We don't have to do the same for in-flight writes, as
colliding writes just remove ranges to TRIM.

Sponsored by:	multiplay.co.uk

This work includes some important fixes and some improvements obtained
from the zfsonlinux project, including TRIMming entire vdevs on pool
create/add/attach and on pool import for spare and cache vdevs.

Obtained from:	zfsonlinux
Submitted by:	Etienne Dechamps <etienne.dechamps@ovh.net>


Changed paths

Path Details
Directoryhead/cddl/lib/libzpool/Makefile modified , text changed
Directoryhead/sys/cddl/compat/opensolaris/sys/dkio.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/trim_map.h added
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio_impl.h modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c added
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c modified , text changed
Directoryhead/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c modified , text changed
Directoryhead/sys/modules/zfs/Makefile modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27