Remove prof_io_ops.fill_io_u_off(), .fill_io_u_size() and .get_next_file()
authorBart Van Assche <bart.vanassche@wdc.com>
Fri, 9 Mar 2018 17:16:23 +0000 (09:16 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 9 Mar 2018 17:20:30 +0000 (10:20 -0700)
Remove the struct prof_io_ops methods for which no implementations
have been defined. This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c
profile.h

diff --git a/io_u.c b/io_u.c
index 61d09ba872e9c816ed0f07b8a07c39b32ccb34e0..2ae05317f7c0f06d9cbb1f4bce0455d18fa3d981 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -575,13 +575,6 @@ static int __get_next_offset(struct thread_data *td, struct io_u *io_u,
 static int get_next_offset(struct thread_data *td, struct io_u *io_u,
                           unsigned int *is_random)
 {
-       if (td->flags & TD_F_PROFILE_OPS) {
-               struct prof_io_ops *ops = &td->prof_io_ops;
-
-               if (ops->fill_io_u_off)
-                       return ops->fill_io_u_off(td, io_u, is_random);
-       }
-
        return __get_next_offset(td, io_u, is_random);
 }
 
@@ -658,13 +651,6 @@ static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
 static unsigned int get_next_buflen(struct thread_data *td, struct io_u *io_u,
                                    unsigned int is_random)
 {
-       if (td->flags & TD_F_PROFILE_OPS) {
-               struct prof_io_ops *ops = &td->prof_io_ops;
-
-               if (ops->fill_io_u_size)
-                       return ops->fill_io_u_size(td, io_u, is_random);
-       }
-
        return __get_next_buflen(td, io_u, is_random);
 }
 
@@ -1387,13 +1373,6 @@ out:
 
 static struct fio_file *get_next_file(struct thread_data *td)
 {
-       if (td->flags & TD_F_PROFILE_OPS) {
-               struct prof_io_ops *ops = &td->prof_io_ops;
-
-               if (ops->get_next_file)
-                       return ops->get_next_file(td);
-       }
-
        return __get_next_file(td);
 }
 
index 8d1f757dd558a68d4bb28e5d0b9d6a6abf1f8710..414151e8cb39406c166b3c6c68a26d1966a60bac 100644 (file)
--- a/profile.h
+++ b/profile.h
@@ -10,10 +10,6 @@ struct prof_io_ops {
        int (*td_init)(struct thread_data *);
        void (*td_exit)(struct thread_data *);
 
-       int (*fill_io_u_off)(struct thread_data *, struct io_u *, unsigned int *);
-       int (*fill_io_u_size)(struct thread_data *, struct io_u *, unsigned int);
-       struct fio_file *(*get_next_file)(struct thread_data *);
-
        int (*io_u_lat)(struct thread_data *, uint64_t);
 };