Closed GoogleCodeExporter closed 9 years ago
libtorrent is supposed to clear the sparse file flag for any file as soon as it
completes. It does this by doing this:
DWORD temp;
FILE_SET_SPARSE_BUFFER b;
b.SetSparse = FALSE;
::DeviceIoControl(m_file_handle, FSCTL_SET_SPARSE, &b, sizeof(b)
, 0, 0, &temp, 0);
Now, there could be a bug where this fails to be executed. Would you think
that's the case?
The whole thing with re-checking to 99.7% seems odd as well, is that related to
the sparse flag? Does that change when you set or clear the sparse flag?
Is the main purpose of having this flag cleared media players performing better?
Original comment by arvid.no...@gmail.com
on 13 Feb 2013 at 3:08
I've checked in a patch that removes the concept of finalizing a file (i.e.
clear the sparse bit) and made that logic more conservative.
Whenever a file open for write mode is closed, and the sparse bit has been set
on it. The file is checked to see if it is in fact sparse. If it isn't, the
sparse flag is cleared. While fixing this, I also found some potential issues
with not passing in OVERLAPPED pointers to some disk operations, when they
would need them. This was also fixed.
The commit is [8015] in RC_0_16.
My testing suggests that it works as intended, I never observed the zombie
sparse flag though. Please test this if convenient.
Original comment by arvid.no...@gmail.com
on 16 Feb 2013 at 8:14
[deleted comment]
[deleted comment]
confirmed here as well on windows 7 x64 with qbittorrent 3.1.0 ALPHA funny
thing is i ended up RMAing two hard drives before coming here -.-
file would play and then abruptly stop was able to repeat the process anytime
that file was downed loaded anyware on c: how ever if I moved the file to d:
the issue did not occur so I assumed the drive was as fault got the new drive
in same issue setting the fsutil sparse flag resolved the issue perhaps there
is some conflict between the fs handles on the OS drive
anouther note is that the issue only seems to occur with file sizes >6.5GB
Original comment by rjc862...@gmail.com
on 25 Feb 2013 at 2:45
work around
1. fsutil sparse setlflag filenameinquestion
2. Open QbitTorrent and force a recheck wait for it to redownload the missing
bits
3. close Qbittorrent and do fsutil sparse setlflag filenameinquestion again
4. copy the file elseware and enjoy
5. if you accidently open Qbittorent and its still has that torrent loaded you
will need to repeat this process untill you either remove the torrent or copy
the file elseware
Original comment by rjc862...@gmail.com
on 25 Feb 2013 at 3:11
For reference, I'm posting the link to the knowledge base article here as well.
This suggests that the sparseness of the file itself causes the problem.
http://support.microsoft.com/kb/2708811?wa=wsignin1.0
Original comment by arvid.no...@gmail.com
on 25 Feb 2013 at 5:08
> http://support.microsoft.com/kb/2708811?wa=wsignin1.0
This may have something to do with
https://code.google.com/p/libtorrent/issues/detail?id=406
The article also states that this happens when two threads write the same file
part at the same time, which is one of my possible explanations for Bug #406.
Original comment by Daymansm...@gmail.com
on 25 Feb 2013 at 5:24
[deleted comment]
[deleted comment]
after checking my system
KB2708811(http://support.microsoft.com/kb/2708811?wa=wsignin1.0) was already
installed
would not explain setting the flag causing the problem to resolve anyway
This fix is delivered via windows update anyway so anyone with a up2date
machine should already have this hot fix
Original comment by rjc862...@gmail.com
on 25 Feb 2013 at 10:55
Original issue reported on code.google.com by
emptyeig...@gmail.com
on 12 Feb 2013 at 7:07