* Fix issue related to continue_on_error option
@ 2009-07-02 1:29 Radha Ramachandran
2009-07-02 6:29 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Radha Ramachandran @ 2009-07-02 1:29 UTC (permalink / raw)
To: fio, Jens Axboe
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;
}
}
thanks
-radha
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: Fix issue related to continue_on_error option
2009-07-02 1:29 Fix issue related to continue_on_error option Radha Ramachandran
@ 2009-07-02 6:29 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2009-07-02 6:29 UTC (permalink / raw)
To: Radha Ramachandran; +Cc: fio
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-07-02 6:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-02 1:29 Fix issue related to continue_on_error option Radha Ramachandran
2009-07-02 6:29 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox