Add unlink hook to ioengine API, gluster ioengine
[fio.git] / ioengines.c
index 0f94d0d9513da64337bbb23284ebb09001b2ebd9..3010f6c146c4dbbcf0f9d191d0f44f22dfaa46d2 100644 (file)
@@ -506,6 +506,14 @@ int td_io_close_file(struct thread_data *td, struct fio_file *f)
        return put_file(td, f);
 }
 
+int td_io_unlink_file(struct thread_data *td, struct fio_file *f)
+{
+       if (td->io_ops->unlink_file)
+               return td->io_ops->unlink_file(td, f);
+       else
+               return unlink(f->file_name);
+}
+
 int td_io_get_file_size(struct thread_data *td, struct fio_file *f)
 {
        if (!td->io_ops->get_file_size)