On Tue, Aug 20, 2013 at 09:17:16AM +0200, Jean-Pierre André wrote:
> Hi,
> 
> This is a bug in ntfs_attr_truncate_solid() leading to a sparse file instead
> of a file whose space is fully allocated, which occurs when the data
> is resident initially. You can avoid the bug by writing 4K bytes before
> calling ntfs_attr_truncate_solid(). Attached is a patch to fix the bug.
> 

Thanks. I applied the patch and it works as expected. Regarding writing
the 4K bytes before calling the truncate, I'm guess this is the cluster
size correct? If I formatted with cluster size 65K, then I will have to
write 65K before truncating.

> Can you explain why you want to allocate space without writing to that
> space, and how you would use the allocated space ?

Sure. The reason is to handle large files more efficiently. Thus, the
running application knows the size of the file, so it preallocates it.
Using your patch above, the preallocation is very fast. Now, the next
step is to get the extents/runlist similar to what FS_IOC_FIEMAP returns
for ext4.

> 
> Regards
> 
> Jean-Pierre

Thanks,
Amit


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to