1240868Spjd/* 2240868Spjd * CDDL HEADER START 3240868Spjd * 4240868Spjd * The contents of this file are subject to the terms of the 5240868Spjd * Common Development and Distribution License (the "License"). 6240868Spjd * You may not use this file except in compliance with the License. 7240868Spjd * 8240868Spjd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9240868Spjd * or http://www.opensolaris.org/os/licensing. 10240868Spjd * See the License for the specific language governing permissions 11240868Spjd * and limitations under the License. 12240868Spjd * 13240868Spjd * When distributing Covered Code, include this CDDL HEADER in each 14240868Spjd * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15240868Spjd * If applicable, add the following below this CDDL HEADER, with the 16240868Spjd * fields enclosed by brackets "[]" replaced with your own identifying 17240868Spjd * information: Portions Copyright [yyyy] [name of copyright owner] 18240868Spjd * 19240868Spjd * CDDL HEADER END 20240868Spjd */ 21240868Spjd/* 22240868Spjd * Copyright (c) 2012 Pawel Jakub Dawidek <pawel@dawidek.net>. 23240868Spjd * All rights reserved. 24240868Spjd */ 25240868Spjd 26240868Spjd#ifndef _SYS_TRIM_MAP_H 27240868Spjd#define _SYS_TRIM_MAP_H 28240868Spjd 29240868Spjd#include <sys/avl.h> 30240868Spjd#include <sys/list.h> 31240868Spjd#include <sys/spa.h> 32240868Spjd 33240868Spjd#ifdef __cplusplus 34240868Spjdextern "C" { 35240868Spjd#endif 36240868Spjd 37240868Spjdextern void trim_map_create(vdev_t *vd); 38240868Spjdextern void trim_map_destroy(vdev_t *vd); 39248574Ssmhextern void trim_map_free(vdev_t *vd, uint64_t offset, uint64_t size, uint64_t txg); 40240868Spjdextern boolean_t trim_map_write_start(zio_t *zio); 41240868Spjdextern void trim_map_write_done(zio_t *zio); 42240868Spjd 43240868Spjdextern void trim_thread_create(spa_t *spa); 44240868Spjdextern void trim_thread_destroy(spa_t *spa); 45240868Spjdextern void trim_thread_wakeup(spa_t *spa); 46240868Spjd 47240868Spjd#ifdef __cplusplus 48240868Spjd} 49240868Spjd#endif 50240868Spjd 51240868Spjd#endif /* _SYS_TRIM_MAP_H */ 52