diff options
author | Chris Mason <clm@fb.com> | 2020-06-18 17:06:29 -0700 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2020-06-18 17:06:29 -0700 |
commit | 206dc1c7fb6e0bfddaa9994511eee4be4d749a79 (patch) | |
tree | 62a444a09afac9279edad9f77b059228f8ec1f50 | |
parent | bb1adec78e2255dc97031906bd3140b53dfe6df8 (diff) | |
download | simoop-206dc1c7fb6e0bfddaa9994511eee4be4d749a79.tar.gz |
simoop: get rid of dirty_an_inode
This was just generating load for no reason, it's hard to make sense of
from a benchmarking point of view.
Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r-- | simoop.c | 27 |
1 files changed, 0 insertions, 27 deletions
@@ -1298,20 +1298,6 @@ static void *du_thread(void *arg) return NULL; } -/* - * create a temporary file and dirty it - */ -static void dirty_an_inode(char *path) -{ - int fd; - int seq = rand() % num_files; - - fd = open_path(path, seq, TMP_FILE, 0); - ftruncate(fd, 100); - ftruncate(fd, 0); - close(fd); -} - static void record_one_lat(struct stats *stat, struct timeval *start, struct timeval *finish) { @@ -1328,7 +1314,6 @@ static void read_from_file(char *path, int seq, char *buf) { int fd; int ret; - int i; off_t offset; ssize_t read_bytes = read_size; struct stat st; @@ -1358,11 +1343,6 @@ static void read_from_file(char *path, int seq, char *buf) read_and_crc(fd, name, xxhash_state, buf, read_bytes, offset, read_bytes, st.st_ino); - /* if we don't have writers making dirty inodes, make some here */ - if (!write_size) { - for (i = 0; i < 8; i++) - dirty_an_inode(path); - } close(fd); XXH32_digest(xxhash_state); } @@ -1413,7 +1393,6 @@ static void read_whole_file(char *path, int seq, char *postfix, static void write_to_file(char *path, int seq, char *buf) { int fd; - int i; int ret; int write_bytes = randomize_size(write_size); loff_t offset; @@ -1460,12 +1439,6 @@ static void write_to_file(char *path, int seq, char *buf) XXH32_digest(xxhash_state); - /* make some dirty inodes */ - if (!append_mode) { - for (i = 0; i < 8; i++) - dirty_an_inode(path); - } - maybe_write_through(fd, 0, 0); if (verify_writes && write_size >= BUF_SIZE) read_whole_fd(fd, name, buf, BUF_SIZE); |