Add some random unlinks into the mix

Signed-off-by: Chris Mason <clm@fb.com>
diff --git a/simoop.c b/simoop.c
index c984168..d305795 100644
--- a/simoop.c
+++ b/simoop.c
@@ -1299,6 +1299,7 @@
 {
 	int fd;
 	int i;
+	int ret;
 	int write_bytes = randomize_size(write_size);
 	loff_t offset;
 	void *xxhash_state = XXH32_init(global_rand_seed);
@@ -1335,6 +1336,18 @@
 		/* delete some files */
 		ftruncate(fd, 0);
 	}
+
+	/*
+	 * lets create some churn of inodes coming in and out and abuse
+	 * the orphan code while we're here
+	 */
+	if (rand() % 5 == 0) {
+		ret = unlink(name);
+		if (ret < 0 && errno != ENOENT) {
+			perror("unlink");
+			exit(1);
+		}
+	}
 	close(fd);
 }