10 Star 15 Fork 5

anolis / fio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
trim.h 903 Bytes
一键复制 编辑 原始数据 按行查看 历史
Sitsofe Wheeler 提交于 2018-03-19 05:33 . Refactor #includes and headers
#ifndef FIO_TRIM_H
#define FIO_TRIM_H
#ifdef FIO_HAVE_TRIM
#include "flist.h"
#include "iolog.h"
#include "compiler/compiler.h"
#include "lib/types.h"
#include "os/os.h"
extern bool __must_check get_next_trim(struct thread_data *td, struct io_u *io_u);
extern bool io_u_should_trim(struct thread_data *td, struct io_u *io_u);
/*
* Determine whether a given io_u should be logged for verify or
* for discard
*/
static inline void remove_trim_entry(struct thread_data *td, struct io_piece *ipo)
{
if (!flist_empty(&ipo->trim_list)) {
flist_del_init(&ipo->trim_list);
td->trim_entries--;
}
}
#else
static inline bool get_next_trim(struct thread_data *td, struct io_u *io_u)
{
return false;
}
static inline bool io_u_should_trim(struct thread_data *td, struct io_u *io_u)
{
return false;
}
static inline void remove_trim_entry(struct thread_data *td, struct io_piece *ipo)
{
}
#endif
#endif
1
https://gitee.com/anolis/fio.git
git@gitee.com:anolis/fio.git
anolis
fio
fio
an8

搜索帮助