[LTP] [PATCH] lib/rmobj.c: fix warning on FUSE fs

Alexey Kodanev alexey.kodanev@oracle.com
Wed Apr 27 15:29:44 CEST 2016


Hi,
On 04/27/2016 03:15 PM, Cyril Hrubis wrote:
> Hi!
>> This warning can appear on FUSE fs in cleanup():
>> TWARN  :  tst_tmpdir.c:219: tst_rmdir: rmobj(...) failed: unlink(
>> .../.fuse_hidden#####) failed; errno=2: No such file or directory
> Isn't this the same problem as the NFS one? I.e. unlinked but still open
> files?

No, checked syscalls/* tests, they all are closing fds before tst_rmdir().

It happens only if test does unlink(fd), then close(fd). If we change a test
so it calls close(fd) first, then unlink(fd), then ".fuse_hidden" never 
being
created to store data about unlinked but still open file, and we won't have
this warning too. It's just another way to workaround it in the tests.

>
> But in this case it looks like the file was still there shortly after
> the fd has been closed, right? I wonder if that is a bug or not. I would
> expect that the file is no longer in the directory listing once the
> close() has returned from kernel.

Hmm, may be it is a bug, for a short period of time after close() we can
still have this temporary file listed. OK, I will check it with our 
developers.

Thanks,
Alexey



More information about the ltp mailing list