Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Radha Ramachandran <radha@google.com>
Cc: fio@vger.kernel.org
Subject: Re: Fix issue related to continue_on_error option
Date: Thu, 2 Jul 2009 08:29:02 +0200	[thread overview]
Message-ID: <20090702062901.GM23611@kernel.dk> (raw)
In-Reply-To: <66dfd3fe0907011829i50ac24b3s787f33c77287a7d9@mail.gmail.com>

On Wed, Jul 01 2009, Radha Ramachandran wrote:
> Hi,
> I added a change so when both the continue_on_error and fill_device
> option is on, when it hits ENOSPC issue the code ignores the error.
> 
> >git diff
> diff --git a/fio.c b/fio.c
> index fa5deab..3365bb1 100644
> --- a/fio.c
> +++ b/fio.c
> @@ -388,21 +388,29 @@ static int break_on_this_error(struct
> thread_data *td, int *retptr)
>                 else
>                         err = td->error;
> 
> -               update_error_count(td, err);
> -
>                 if (td_non_fatal_error(err)) {
>                         /*
>                          * Continue with the I/Os in case of
>                          * a non fatal error.
>                          */
> +                       update_error_count(td, err);
>                         td_clear_error(td);
>                         *retptr = 0;
>                         return 0;
> +               } else if (td->o.fill_device && err == ENOSPC) {
> +                       /*
> +                        * We expect to hit this error if
> +                        * fill_device option is set.
> +                        */
> +                       td_clear_error(td);
> +                       td->terminate = 1;
> +                       return 1;
>                 } else {
>                         /*
>                          * Stop the I/O in case of a fatal
>                          * error.
>                          */
> +                       update_error_count(td, err);
>                         return 1;
>                 }
>         }

Looks good, applied. Thanks!

-- 
Jens Axboe


      reply	other threads:[~2009-07-02  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02  1:29 Fix issue related to continue_on_error option Radha Ramachandran
2009-07-02  6:29 ` 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=20090702062901.GM23611@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=fio@vger.kernel.org \
    --cc=radha@google.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