From: Zhang, Yanmin Date: Tue, 26 Feb 2008 14:35:52 +0000 (+0100) Subject: extend_file need continue when the file exists X-Git-Tag: fio-1.20-rc1~36 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=982016d689dc7fedbb09646ba0df7e72a781b164;ds=sidebyside extend_file need continue when the file exists If some testing files exist and some others don't exist, fio will report failure on the no-exist file. Here is a patch to fix it. Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 785afcee..d10840a2 100644 --- a/filesetup.c +++ b/filesetup.c @@ -34,7 +34,7 @@ static int extend_file(struct thread_data *td, struct fio_file *f) unlink_file = 1; if (unlink_file || new_layout) { - if (unlink(f->file_name) < 0) { + if ((unlink(f->file_name) < 0) && (errno != ENOENT)) { td_verror(td, errno, "unlink"); return 1; }