From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: fio offset with ba References: From: Jens Axboe Message-ID: <09b5336f-ab73-ee27-1db7-17085e42da39@kernel.dk> Date: Wed, 25 Oct 2017 21:24:45 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit To: Jeff Furlong , Sitsofe Wheeler Cc: "fio@vger.kernel.org" List-ID: On 10/25/2017 05:27 PM, Jeff Furlong wrote: >> Actually here's a question - what does .interval do? > Looks like it is used to override the default value of 1 in gopt_new_int(): > interval = 1.0; > if (o->interval) > interval = o->interval; > i->spin = gtk_spin_button_new_with_range(o->minval, maxval, interval); > > But your larger question may be why do some options have interval > (e.g. offset) and some not have interval (e.g. ioengine). It's for the GUI, where you want to specify in which increments a value is adjusted when you use the up and down arrows to change it. It's only applicable to numberical values, it would not make sense to apply to something like ioengine or similar. > diff --git a/filesetup.c b/filesetup.c > index 7a602d4..5d7ea5c 100644 > --- a/filesetup.c > +++ b/filesetup.c > @@ -869,12 +869,10 @@ uint64_t get_start_offset(struct thread_data *td, struct fio_file *f) > > if (o->start_offset_percent > 0) { > /* > - * if blockalign is provided, find the min across read, write, > - * and trim > + * if offset_align is provided, set initial offset > */ > - if (fio_option_is_set(o, ba)) { > - align_bs = (unsigned long long) min(o->ba[DDIR_READ], o->ba[DDIR_WRITE]); > - align_bs = min((unsigned long long) o->ba[DDIR_TRIM], align_bs); > + if (fio_option_is_set(o, start_offset_align)) { > + align_bs = o->start_offset_align; I'm curious why this drops the 'ba' part? -- Jens Axboe