Kill unused parameters
authorJens Axboe <jens.axboe@oracle.com>
Thu, 24 Apr 2008 10:44:42 +0000 (12:44 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 24 Apr 2008 10:44:42 +0000 (12:44 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blktrace.c
fio.h
io_u.c
log.c

index 579a39f6775ba79cea1296beceabb0546efacfd3..46dc13bd6b7b9e1548fca5ecbcd1d413e623ea49 100644 (file)
@@ -219,7 +219,7 @@ static void store_ipo(struct thread_data *td, unsigned long long offset,
        queue_io_piece(td, ipo);
 }
 
        queue_io_piece(td, ipo);
 }
 
-static void handle_trace_notify(struct thread_data *td, struct blk_io_trace *t)
+static void handle_trace_notify( struct blk_io_trace *t)
 {
        switch (t->action) {
        case BLK_TN_PROCESS:
 {
        switch (t->action) {
        case BLK_TN_PROCESS:
@@ -266,7 +266,7 @@ static void handle_trace(struct thread_data *td, struct blk_io_trace *t,
                return;
 
        if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY))
                return;
 
        if (t->action & BLK_TC_ACT(BLK_TC_NOTIFY))
-               handle_trace_notify(td, t);
+               handle_trace_notify(t);
        else
                handle_trace_fs(td, t, ttime, ios, bs);
 }
        else
                handle_trace_fs(td, t, ttime, ios, bs);
 }
diff --git a/fio.h b/fio.h
index 036e62afe115316fed70751d5f2e3374da84485c..6f2c4c09810c3e1c379c8570db70384412ba274c 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -700,9 +700,9 @@ static inline void fio_ro_check(struct thread_data *td, struct io_u *io_u)
 }
 
 #define BLOCKS_PER_MAP         (8 * sizeof(long))
 }
 
 #define BLOCKS_PER_MAP         (8 * sizeof(long))
-#define TO_MAP_BLOCK(td, f, b) (b)
-#define RAND_MAP_IDX(td, f, b) (TO_MAP_BLOCK(td, f, b) / BLOCKS_PER_MAP)
-#define RAND_MAP_BIT(td, f, b) (TO_MAP_BLOCK(td, f, b) & (BLOCKS_PER_MAP - 1))
+#define TO_MAP_BLOCK(f, b)     (b)
+#define RAND_MAP_IDX(f, b)     (TO_MAP_BLOCK(f, b) / BLOCKS_PER_MAP)
+#define RAND_MAP_BIT(f, b)     (TO_MAP_BLOCK(f, b) & (BLOCKS_PER_MAP - 1))
 
 #define MAX_JOBS       (1024)
 
 
 #define MAX_JOBS       (1024)
 
diff --git a/io_u.c b/io_u.c
index 46d9e0b7f86a8d21f592cb473edba6eb126d99d9..985c99b2bb7f1094ee28804bfcef060987cb3446 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -24,11 +24,10 @@ struct io_completion_data {
  * The ->file_map[] contains a map of blocks we have or have not done io
  * to yet. Used to make sure we cover the entire range in a fair fashion.
  */
  * The ->file_map[] contains a map of blocks we have or have not done io
  * to yet. Used to make sure we cover the entire range in a fair fashion.
  */
-static int random_map_free(struct thread_data *td, struct fio_file *f,
-                          const unsigned long long block)
+static int random_map_free(struct fio_file *f, const unsigned long long block)
 {
 {
-       unsigned int idx = RAND_MAP_IDX(td, f, block);
-       unsigned int bit = RAND_MAP_BIT(td, f, block);
+       unsigned int idx = RAND_MAP_IDX(f, block);
+       unsigned int bit = RAND_MAP_BIT(f, block);
 
        dprint(FD_RANDOM, "free: b=%llu, idx=%u, bit=%u\n", block, idx, bit);
 
 
        dprint(FD_RANDOM, "free: b=%llu, idx=%u, bit=%u\n", block, idx, bit);
 
@@ -57,11 +56,11 @@ static void mark_random_map(struct thread_data *td, struct io_u *io_u)
                 * If we have a mixed random workload, we may
                 * encounter blocks we already did IO to.
                 */
                 * If we have a mixed random workload, we may
                 * encounter blocks we already did IO to.
                 */
-               if ((td->o.ddir_nr == 1) && !random_map_free(td, f, block))
+               if ((td->o.ddir_nr == 1) && !random_map_free(f, block))
                        break;
 
                        break;
 
-               idx = RAND_MAP_IDX(td, f, block);
-               bit = RAND_MAP_BIT(td, f, block);
+               idx = RAND_MAP_IDX(f, block);
+               bit = RAND_MAP_BIT(f, block);
 
                fio_assert(td, idx < f->num_maps);
 
 
                fio_assert(td, idx < f->num_maps);
 
@@ -136,7 +135,7 @@ static int get_next_rand_offset(struct thread_data *td, struct fio_file *f,
                /*
                 * calculate map offset and check if it's free
                 */
                /*
                 * calculate map offset and check if it's free
                 */
-               if (random_map_free(td, f, *b))
+               if (random_map_free(f, *b))
                        return 0;
 
                dprint(FD_RANDOM, "get_next_rand_offset: offset %llu busy\n",
                        return 0;
 
                dprint(FD_RANDOM, "get_next_rand_offset: offset %llu busy\n",
diff --git a/log.c b/log.c
index 082cfd410bcbe356f2451f32399b164a6de45093..15de3c24d10bf64698325479af7e5b45f80c81aa 100644 (file)
--- a/log.c
+++ b/log.c
@@ -334,15 +334,6 @@ static int read_iolog2(struct thread_data *td, FILE *f)
        return 0;
 }
 
        return 0;
 }
 
-/*
- * Read version 1 iolog data.
- */
-static int read_iolog(struct thread_data *td, FILE *f)
-{
-       log_err("fio: iolog version 1 is no longer supported\n");
-       return 1;
-}
-
 /*
  * open iolog, check version, and call appropriate parser
  */
 /*
  * open iolog, check version, and call appropriate parser
  */
@@ -372,16 +363,8 @@ static int init_iolog_read(struct thread_data *td)
        if (!strncmp(iolog_ver2, buffer, strlen(iolog_ver2)))
                ret = read_iolog2(td, f);
        else {
        if (!strncmp(iolog_ver2, buffer, strlen(iolog_ver2)))
                ret = read_iolog2(td, f);
        else {
-               /*
-                * seek back to the beginning
-                */
-               if (fseek(f, 0, SEEK_SET) < 0) {
-                       td_verror(td, errno, "iolog read");
-                       log_err("fio: unable to read iolog\n");
-                       return 1;
-               }
-
-               ret = read_iolog(td, f);
+               log_err("fio: iolog version 1 is no longer supported\n");
+               ret = 1;
        }
 
        fclose(f);
        }
 
        fclose(f);