Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Juan Casse <jcasse@chromium.org>
Cc: Grant Grundler <grundler@chromium.org>, fio@vger.kernel.org
Subject: Re: [PATCH] Fixes bug: stale LAST_POS(f) is not being reset.
Date: Fri, 20 Sep 2013 09:20:23 -0600	[thread overview]
Message-ID: <523C67B7.50909@kernel.dk> (raw)
In-Reply-To: <1379624876-27770-1-git-send-email-jcasse@chromium.org>

On 09/19/2013 03:07 PM, Juan Casse wrote:
> Problem:
> When running fio with ioengine=sync, LAST_POS(f) state is not
> reset after the file is closed. This causes workloads with
> readwrite=randread and loops > 1 to fail verification if the
> state of LAST_POS(f) at the beginning of the next loop is the
> same as the io_u->offset. If that is the case, lseek in not
> invoked, but the file position is at 0 and not at io_u->offset.
> 
> Proposed Solution:
> Other ioengines, such as binject and fusion-aw, set f->engine_data
> to 0 when closing the file. The sync ioengin uses f->engine_data to
> store the LAST_POS(f) state. The proposed solution is to set
> f->engine_data = 0 when closing a file in generic_close_file().

Thanks, good catch and fix. Applied.

-- 
Jens Axboe


      reply	other threads:[~2013-09-20 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 21:07 [PATCH] Fixes bug: stale LAST_POS(f) is not being reset Juan Casse
2013-09-20 15:20 ` Jens Axboe [this message]

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=523C67B7.50909@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=grundler@chromium.org \
    --cc=jcasse@chromium.org \
    /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