1/*
2 *   Copyright (c) International Business Machines Corp., 2001-2004
3 *
4 *   This program is free software;  you can redistribute it and/or modify
5 *   it under the terms of the GNU General Public License as published by
6 *   the Free Software Foundation; either version 2 of the License, or
7 *   (at your option) any later version.
8 *
9 *   This program is distributed in the hope that it will be useful,
10 *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
11 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
12 *   the GNU General Public License for more details.
13 *
14 *   You should have received a copy of the GNU General Public License
15 *   along with this program;  if not, write to the Free Software
16 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18#ifndef _FILEOPS_H_
19#define _FILEOPS_H_
20
21#include "ffsb_thread.h"
22#include "ffsb.h"
23#include "ffsb_op.h"
24#include "ffsb_fs.h"
25
26void ffsb_readfile(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
27void ffsb_readall(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
28void ffsb_writefile(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
29void ffsb_writefile_fsync(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
30void ffsb_writeall(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
31void ffsb_writeall_fsync(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
32void ffsb_createfile(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
33void ffsb_createfile_fsync(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
34void ffsb_deletefile(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
35void ffsb_appendfile(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
36void ffsb_appendfile_fsync(ffsb_thread_t *tconfig, ffsb_fs_t *, unsigned opnum);
37void ffsb_stat(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum);
38void ffsb_open_close(ffsb_thread_t *ft, ffsb_fs_t *fs, unsigned opnum);
39
40struct ffsb_op_results;
41
42void ffsb_read_print_exl(struct ffsb_op_results *, double secs, unsigned op_num);
43void ffsb_write_print_exl(struct ffsb_op_results *, double secs, unsigned op_num);
44void ffsb_create_print_exl(struct ffsb_op_results *, double secs, unsigned op_num);
45void ffsb_append_print_exl(struct ffsb_op_results *, double secs, unsigned op_num);
46
47/* Set up ops for either aging or benchmarking */
48void fop_bench(ffsb_fs_t *fs, unsigned opnum);
49void fop_age(ffsb_fs_t *fs, unsigned opnum);
50
51#endif /* _FILEOPS_H_ */
52