Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: ehrhardt@linux.vnet.ibm.com
Cc: fio@vger.kernel.org, oberpar@linux.vnet.ibm.com
Subject: Re: [patch 8/9] fio: fix last block never being touched by random offsets
Date: Thu, 20 Feb 2014 09:18:59 -0800	[thread overview]
Message-ID: <20140220171832.GC30251@kernel.dk> (raw)
In-Reply-To: <20140220132051.624645398@linux.vnet.ibm.com>

On Thu, Feb 20 2014, ehrhardt@linux.vnet.ibm.com wrote:
> *Resend with hopefully non mangled patches*
> References: <20140220131958.965092001@linux.vnet.ibm.com>
> Content-Disposition: inline; filename=fix_last_block.diff
> 
> From: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
> 
> Fix the available range for random offsets which never touched the last block.
> 
> Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> ---
> [diffstat]
>  io_u.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/io_u.c
> +++ b/io_u.c
> @@ -104,7 +104,7 @@ static int __get_next_rand_offset(struct
>  
>  		dprint(FD_RANDOM, "off rand %llu\n", (unsigned long long) r);
>  
> -		*b = (lastb - 1) * (r / ((uint64_t) rmax + 1.0));
> +		*b = lastb * (r / ((uint64_t) rmax + 1.0));
>  	} else {
>  		uint64_t off = 0;

Wont this generate lastb as the potentially last block? We want lastb-1
as the last one, otherwise the length of IO from it will be 0.

I might be missing something here.

-- 
Jens Axboe



  reply	other threads:[~2014-02-20 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-20 13:20 [patch 8/9] fio: fix last block never being touched by random offsets ehrhardt
2014-02-20 17:18 ` Jens Axboe [this message]
2014-02-28 16:46   ` Peter Oberparleiter
2014-02-28 17:07     ` Jens Axboe
     [not found] <20140219143639.168501090@linux.vnet.ibm.com>
2014-02-19 15:12 ` Christian Ehrhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140220171832.GC30251@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=fio@vger.kernel.org \
    --cc=oberpar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox