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>
diff --git a/simoop.c b/simoop.c
index 193330f..664c831 100644
--- a/simoop.c
+++ b/simoop.c
@@ -1298,20 +1298,6 @@
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 @@
{
int fd;
int ret;
- int i;
off_t offset;
ssize_t read_bytes = read_size;
struct stat st;
@@ -1358,11 +1343,6 @@
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 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 @@
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);