From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: Unlink after each loop in job References: <48aea5d8-12a5-58ca-9008-913e13bc7a8d@kernel.dk> <4ac1a598-480e-bfa6-3704-929c909be5da@kernel.dk> From: Jens Axboe Message-ID: <0523eea4-0332-2b8e-a595-fd66cd6ae3de@kernel.dk> Date: Fri, 5 Aug 2016 07:50:53 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Martin Dev , fio@vger.kernel.org List-ID: On 08/05/2016 01:31 AM, Martin Dev wrote: > Hey Jens, > > I applied your patch, but it doesn't unlink the file as it continues > at the !fio_file_open(f) in unlink_files(), run for 2 loops > > Clear State: 0 > Clear State: 1 > Doing unlink > Starting file loop > File is not open! > > I assume it's OK to flip it and check if the file is open then > continue (so not to unlink files that are potentially still in use) > > I'll update the readme/docs and fio.1 as suggested. The file_open() should just be removed, at best, or at least we should flip the check, it doesn't make a lot of sense to only unlink if it's open. In any case, it doesn't really matter if it's open or not, last user will drop it. So I'd just drop that check. -- Jens Axboe