tuxera / ntfs-3g

NTFS-3G Safe Read/Write NTFS Driver
https://www.tuxera.com/company/open-source
GNU General Public License v2.0
994 stars 149 forks source link

Won't close HUGE file after transferring #121

Open Ahadrp opened 2 months ago

Ahadrp commented 2 months ago

I was transferring an iso file (~1.5GB), then I realize the file is not closed yet:

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME mount.ntf 153017 root 20w REG 259,2 1541406720 64 /media/path/a.out mount.ntf 153055 root 20w REG 259,2 1541406720 64 /media/path/a.out mount.ntf 153093 root 20w REG 259,2 1541406720 64 /media/path/a.out

Well, there are two questions:

  1. Why there are three processes?
  2. Why the file didn't close?!
unsound commented 2 months ago

I'm as confused about this as you are. What is /media/path/a.out? Can you issue the command stat /media/path/a.out and post the output?

Ahadrp commented 2 months ago

I'm as confused about this as you are. What is /media/path/a.out? Can you issue the command stat /media/path/a.out and post the output?

Well, being in rush made me not to be clarify!

By saying /media/path/a.out I mean the [.iso] file.

For more explenation, let me talk about a scenario: I got two ntfs filesystems: A and B.

I just transferred the an .iso file to A and then move it to B. Well, I thought the transference happened successfully, so I just removed the .iso file from B. But here is the result:

and when I looked at the fd(s) at the mount point process of A filesystem, I realized that the file is not transferred, and the link which is referring to transference of .iso to B is beeping to red and white:

$ ls -la /proc/2425/fd
 total 0
dr-x------ 2 user user 0 Sep 4 15:34 . 
dr-xr-xr-x 9 user user 0 Sep 4 15:34 .. 
lrwx------ 1 user user 64 Sep 4 15:34 0 -> /dev/pts/0 
lrwx------ 1 user user 64 Sep 4 15:34 1 -> /dev/pts/0 
lrwx------ 1 user user 64 Sep 4 15:34 2 -> /dev/pts/0 
lrwx------ 1 user user 64 Sep 4 15:34 3 -> /media/A/a.iso 
lrwx------ 1 user user 64 Sep 4 15:34 4 -> /media/B/.iso [this is beeping. as I mentioned, I just removed it from B]

I'm sure that the transference is finished at my side, so:

  1. Why is the transition to A is not finished (socket is still open)?
  2. Why is the transition from A to B is not finished?

It's good to mention that this just happens on huge files (1.5GB> in my tests)

Using the Rocky-Linux-8 The ntfs-3g version: ntfs-3g-2022.10.3-1.el8.x86_64