fio icon indicating copy to clipboard operation
fio copied to clipboard

fio did not delete directories after completing IO with unlink=1

Open wangyihanlarry opened this issue 1 year ago • 1 comments

Hi, I used the following fio profile to create bunch of files in the deep directory and doing some IO practice, after IO completion, I want all the files and directories are wiped out, the files could be deleted as expected, the folder, however, still there. could you please help to check?

[global]
ioengine=psync
direct=1
rw=write
file_service_type=sequential:1
filename_format=$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$jobnum/$filenum
openfiles=1
create_on_open=1
end_fsync=1
unlink=1
[fstest]
numjobs=200
directory=/test/lar1:/test/lar2
filesize=1M
nrfiles=1000

wangyihanlarry avatar Sep 06 '23 16:09 wangyihanlarry

The feature that fio provides only unlinks the output files when done. There is no additional work done to record which directories were created and delete those as well. I can see why a user might expect directories to be deleted as well, but fio currently doesn't have this capability. If you or anyone else is interested in contributing this capability I'd be happy to review it.

vincentkfu avatar Sep 18 '23 19:09 vincentkfu