Closed tomaz-beltram closed 2 months ago
I don't believe such kind of thing happens... because ltfs
process never share any resources. On the other hand, I don't have any equipment to confirm this.
Please confirm the only thing that you don't share the mount point within 2 ltfs
processes , like /mnt/ltfs
and '/mnt/ltfs/ltfs2`.
Thanks for your comment. In the meantime we found out that that cause for file system busy error on unmount was file handle inheritance of forked mount processes. Our main process forks different ltfs mount processes and they inherit open handles of the parent (and its child) processes at the time of fork call. The inherited file handle is closed only on child exit. The solution is to use O_CLOEXEC flag when opening files.
Describe the bug When using multiple LTFS mounts in parallel it happens sometimes that the unmount returns "Device or resource busy" error repeatedly for a longer period of time. Also lsof shows that the ltfs process holds open handle for a file on that mountpoint. After another LTFS is successfully unmounted all other also succeeds to unmount. It looks like a handle leak in LTFS/FUSE code. Strange thing is that all parallel LTFS mounts are somehow interrelated.
To Reproduce Steps to reproduce the behavior:
Expected behavior The first LTFS is unmounted w/o error regardless of the other still being busy.
Desktop (please complete the following information):
Additional context Data on tape are several 1GB files.