FreeBSD ZFS
The Zettabyte File System
Data Structures | Typedefs | Functions | Variables

trim_map.c File Reference

#include <sys/zfs_context.h>
#include <sys/spa_impl.h>
#include <sys/vdev_impl.h>
#include <sys/trim_map.h>
Include dependency graph for trim_map.c:

Go to the source code of this file.

Data Structures

struct  trim_map
struct  trim_seg

Typedefs

typedef struct trim_map trim_map_t
typedef struct trim_seg trim_seg_t

Functions

 SYSCTL_DECL (_vfs_zfs)
 TUNABLE_INT ("vfs.zfs.trim_txg_limit",&trim_txg_limit)
 SYSCTL_INT (_vfs_zfs, OID_AUTO, trim_txg_limit, CTLFLAG_RW,&trim_txg_limit, 0,"Delay TRIMs by that many TXGs.")
static void trim_map_vdev_commit_done (spa_t *spa, vdev_t *vd)
static int trim_map_seg_compare (const void *x1, const void *x2)
static int trim_map_zio_compare (const void *x1, const void *x2)
void trim_map_create (vdev_t *vd)
void trim_map_destroy (vdev_t *vd)
static void trim_map_segment_add (trim_map_t *tm, uint64_t start, uint64_t end, uint64_t txg)
static void trim_map_segment_remove (trim_map_t *tm, trim_seg_t *ts, uint64_t start, uint64_t end)
static void trim_map_free_locked (trim_map_t *tm, uint64_t start, uint64_t end, uint64_t txg)
void trim_map_free (zio_t *zio)
boolean_t trim_map_write_start (zio_t *zio)
void trim_map_write_done (zio_t *zio)
static trim_seg_ttrim_map_first (trim_map_t *tm, uint64_t txg)
static void trim_map_vdev_commit (spa_t *spa, zio_t *zio, vdev_t *vd)
static void trim_map_commit (spa_t *spa, zio_t *zio, vdev_t *vd)
static void trim_map_commit_done (spa_t *spa, vdev_t *vd)
static void trim_thread (void *arg)
void trim_thread_create (spa_t *spa)
void trim_thread_destroy (spa_t *spa)
void trim_thread_wakeup (spa_t *spa)

Variables

boolean_t zfs_notrim
static int trim_txg_limit = 64

Typedef Documentation

typedef struct trim_map trim_map_t
typedef struct trim_seg trim_seg_t

Function Documentation

SYSCTL_DECL ( _vfs_zfs  )
SYSCTL_INT ( _vfs_zfs  ,
OID_AUTO  ,
trim_txg_limit  ,
CTLFLAG_RW  ,
trim_txg_limit,
,
"Delay TRIMs by that many TXGs."   
)
static void trim_map_commit ( spa_t spa,
zio_t zio,
vdev_t vd 
) [static]

Definition at line 433 of file trim_map.c.

static void trim_map_commit_done ( spa_t spa,
vdev_t vd 
) [static]

Definition at line 449 of file trim_map.c.

void trim_map_create ( vdev_t vd)

Definition at line 98 of file trim_map.c.

void trim_map_destroy ( vdev_t vd)

Definition at line 123 of file trim_map.c.

static trim_seg_t* trim_map_first ( trim_map_t tm,
uint64_t  txg 
) [static]

Definition at line 356 of file trim_map.c.

void trim_map_free ( zio_t zio)

Definition at line 264 of file trim_map.c.

static void trim_map_free_locked ( trim_map_t tm,
uint64_t  start,
uint64_t  end,
uint64_t  txg 
) [static]

Definition at line 243 of file trim_map.c.

static int trim_map_seg_compare ( const void *  x1,
const void *  x2 
) [static]

Definition at line 60 of file trim_map.c.

static void trim_map_segment_add ( trim_map_t tm,
uint64_t  start,
uint64_t  end,
uint64_t  txg 
) [static]

Definition at line 163 of file trim_map.c.

static void trim_map_segment_remove ( trim_map_t tm,
trim_seg_t ts,
uint64_t  start,
uint64_t  end 
) [static]

Definition at line 212 of file trim_map.c.

static void trim_map_vdev_commit ( spa_t spa,
zio_t zio,
vdev_t vd 
) [static]

Definition at line 369 of file trim_map.c.

static void trim_map_vdev_commit_done ( spa_t spa,
vdev_t vd 
) [static]

Definition at line 398 of file trim_map.c.

void trim_map_write_done ( zio_t zio)

Definition at line 325 of file trim_map.c.

boolean_t trim_map_write_start ( zio_t zio)

Definition at line 279 of file trim_map.c.

static int trim_map_zio_compare ( const void *  x1,
const void *  x2 
) [static]

Definition at line 79 of file trim_map.c.

static void trim_thread ( void *  arg) [static]

Definition at line 465 of file trim_map.c.

void trim_thread_create ( spa_t spa)

Definition at line 492 of file trim_map.c.

void trim_thread_destroy ( spa_t spa)

Definition at line 507 of file trim_map.c.

void trim_thread_wakeup ( spa_t spa)

Definition at line 530 of file trim_map.c.

TUNABLE_INT ( "vfs.zfs.trim_txg_limit"  ,
trim_txg_limit 
)

Variable Documentation

int trim_txg_limit = 64 [static]

Definition at line 52 of file trim_map.c.

boolean_t zfs_notrim

Definition at line 95 of file zil.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines