Merge branch 'master' into gfio
authorJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 19:13:57 +0000 (20:13 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Feb 2013 19:13:57 +0000 (20:13 +0100)
1  2 
filesetup.c

diff --combined filesetup.c
@@@ -96,9 -96,9 +96,9 @@@ static int extend_file(struct thread_da
  
                        r = fallocate(f->fd, FALLOC_FL_KEEP_SIZE, 0,
                                        f->real_file_size);
 -                      if (r != 0) {
 +                      if (r != 0)
                                td_verror(td, errno, "fallocate");
 -                      }
 +
                        break;
  #endif /* CONFIG_LINUX_FALLOCATE */
                default:
@@@ -919,9 -919,9 +919,9 @@@ static int __init_rand_distribution(str
                seed = td->rand_seeds[4];
  
        if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
 -              zipf_init(&f->zipf, nranges, td->o.zipf_theta, seed);
 +              zipf_init(&f->zipf, nranges, td->o.zipf_theta.u.f, seed);
        else
 -              pareto_init(&f->zipf, nranges, td->o.pareto_h, seed);
 +              pareto_init(&f->zipf, nranges, td->o.pareto_h.u.f, seed);
  
        return 1;
  }
@@@ -958,8 -958,8 +958,8 @@@ int init_random_map(struct thread_data 
        for_each_file(td, f, i) {
                uint64_t file_size = min(f->real_file_size, f->io_size);
  
-               blocks = (file_size + td->o.rw_min_bs - 1) /
-                               (unsigned long long) td->o.rw_min_bs;
+               blocks = file_size / (unsigned long long) td->o.rw_min_bs;
                if (td->o.random_generator == FIO_RAND_GEN_LFSR) {
                        unsigned long seed;