Flexible I/O Tester development
 help / color / mirror / Atom feed
* unlink=1 issue on Windows
@ 2014-03-19 16:02 Sébastien Bouchex Bellomié
  2014-03-20 14:29 ` Jens Axboe
  2014-03-20 17:59 ` unlink castor.fu
  0 siblings, 2 replies; 8+ messages in thread
From: Sébastien Bouchex Bellomié @ 2014-03-19 16:02 UTC (permalink / raw)
  To: fio@vger.kernel.org

Hi,

I'm having an issue on windows : unlink=1 is not working (temp file are still there) and it's working fine on unix

Looking at the code in close_and_free_files function :

[...]
if (td->o.unlink && f->filetype == FIO_TYPE_FILE) {
			dprint(FD_FILE, "free unlink %s\n", f->file_name);
			unlink(f->file_name);
		}
[...]

Unlink() fails because the file is still open : On Solaris, truss shows the following :

[...]
write(3, "\0\0\0\0\0 ;80\0\0\0\0\0".., 32768)   = 32768
unlink("/data/fio/random_rw.0.0")               = 0
close(3)                                        = 0
[...]

So unlink is called first.

I would put this unlinking phase AFTER the remove_file_hash call.

Seb

S�bastien BOUCHEX BELLOMI�
Infovista� Server Technical Lead, Service Assurance R&D



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-21 17:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 16:02 unlink=1 issue on Windows Sébastien Bouchex Bellomié
2014-03-20 14:29 ` Jens Axboe
2014-03-20 17:59 ` unlink castor.fu
2014-03-20 17:59   ` [PATCH 1/2] Pass -Wstrict-prototypes -Wold-style-definition, whitespace castor.fu
2014-03-21 15:29     ` Jens Axboe
2014-03-20 17:59   ` [PATCH 2/2] Add unlink hook to ioengine API castor.fu
2014-03-21 15:27     ` Jens Axboe
2014-03-21 17:03       ` Castor Fu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox