Preallocation bug?
Preallocation bug?
running in daemon mode, preallocation is set to 0, still skipped files are filled with 0-s. In my case file starts with 0-s then at the end of the file a little data is written resulting in full file size.
Re: Preallocation bug?
Using Windows version, latest release transmission-3.00-x64.msi
Re: Preallocation bug?
For partially downloaded files *not* to occupy their full size you need to set preallocation to 1 (sparse), which is the default. What 0 means is that there'll be no preallocation attempts on Transmission side, but writing bytes past the end of any file (and in this case at the end of a non-existent or effectively 0-length file) means that OS will decide how to fill the preceding rest of the file to fill the gap, which usually means non-sparse allocation.
When set to 1, despite the appearance that the file has its full size and is mostly filled with zeroes, you'll see the difference in sizes when viewing file properties, like e.g. in this screenshot:
When set to 1, despite the appearance that the file has its full size and is mostly filled with zeroes, you'll see the difference in sizes when viewing file properties, like e.g. in this screenshot:
Re: Preallocation bug?
It could be that copying files from incomplete to complete directory makes them non-sparse, will need to look into this. In case you're copying yourself, tools like ntfscopy might be useful.
Re: Preallocation bug?
Stopped the Windows service changed preallocation back to 1, removed skipped part files, did a Verify and downloaded the remaining chunks. File size on the file properties page is still shows full size. I do not use directory for incomplete files.
Re: Preallocation bug?
What's the filesystem on the volume where you store torrents? Sparse preallocation would only work for NTFS. Also, check if sparse allocation is enabled for any given file(s) (as admin):
Code: Select all
> fsutil file layout test.dat
********* File 0x000200000018f2cc *********
File reference number : 0x000200000018f2cc
File attributes : 0x00000220: Archive | Sparse <--- note Sparse here
File entry flags : 0x00000000
Link (ParentID: Name) : 0x000c000000033f6b: NTFS+DOS Name: \path\to\test.dat
Creation Time : 12/29/2020 17:07:47
Last Access Time : 12/29/2020 17:08:59
Last Write Time : 12/29/2020 17:08:59
Change Time : 12/29/2020 17:08:59
LastUsn : 11,817,169,888
OwnerId : 0
SecurityId : 5206
StorageReserveId : 0
Stream : 0x010 ::$STANDARD_INFORMATION
Attributes : 0x00000000: *NONE*
Flags : 0x0000000c: Resident | No clusters allocated
Size : 72
Allocated Size : 72
Stream : 0x030 ::$FILE_NAME
Attributes : 0x00000000: *NONE*
Flags : 0x0000000c: Resident | No clusters allocated
Size : 82
Allocated Size : 88
Stream : 0x080 ::$DATA
Attributes : 0x00000200: Sparse <--- note Sparse here
Flags : 0x00000018: No clusters allocated | Has Parsed Information
Size : 1,000,000,000 (953.7 MB) <--- note full size here
Allocated Size : 0 ( 0.0 KB) <--- note way smaller size here
Vdl : 0 ( 0.0 KB)
Extents : 1 Extents
Re: Preallocation bug?
Filesystem is NTFS. Checked the file, had only
After running
attributes are
Code: Select all
File attributes : 0x00000020: Archive
Code: Select all
fsutil.exe sparse setflag filename.part
Code: Select all
File attributes : 0x00000220: Archive | Sparse
...
Stream : 0x080 ::$DATA
Attributes : 0x00000200: Sparse
Flags : 0x00000010: Has Parsed Information
Size : 1,251,616,362 (1.2 GB)
Allocated Size : 1,251,672,064 (1.2 GB)
Vdl : 1,251,616,362 (1.2 GB)
Extents : 2 Extents