-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support fast space allocation? #45
Comments
Well, looks like the infrastructure (kernel, FUSE and programs) just isn't ready for such feature. Possible mechanism 4: Possible mechanism 5:
If SSD controller supports data compression, it hardly writes anything to flash in this case. |
Option (4) would be probably the easiest to add/use but it is a violation of the interface and may break programs. Option (5) is better than nothing, but I am not sure if it works on the USB disk enclosure. |
I had intention to run Samba share of a exfat formatted external drive but this issue is what prevents me to do that. After I connect to a Samba share from Windows client and attempt to copy large file there (on the exfat drive), it starts by truncating the file first. Because the truncate is slow (it's via USB 2), Windows client timeouts (and reports error) if the actual transfer doesn't start within 20 seconds. https://bugzilla.samba.org/show_bug.cgi?id=3583 |
Can be both. A possible solution that comes to my mind:
FS should be in a consistent state during all those operations while avoiding extra initialization of blocks that will be overwritten soon. But this would be quite a complex change. |
Is there anything new about this topic? Problem still exists, makes ExFat as underlying file system unusable. |
bump... |
Same problem here!
Tested with both So when sending 2 GB from Windows Explorer to a Linux+Samba+exFAT computer, 4 GB are actually written:
It doubles the transfer time. Anyone an idea? |
I have recently bought an IODD-2541 USB disk enclosure which should allow me to expose files as virtual disk devices. It supports FAT32/exFAT and NTFS, but since NTFS sounds overkill and less supported for Linux I decided to use the exFAT.
Due to the design, files must be contiguously allocated. When I used
truncate -s 20G disk.vhd
, it took a while before all bytes were written to the SSD. This could probably be explained by the requirement to initialize extended part with zeroes (\0
).Proposal: a method to request allocation some sectors without writing zeroes to new blocks.
I am fully aware of the security issues from exposing possibly deleted data, but am willing to risk that for creating "empty" disk images. The undelying SSD does not have confidential data and the test images are just like that, test images.
Possible mechanism 1:
The Linux-specific
fallocate(2)
function combined with theFALLOC_FL_NO_HIDE_STALE
mode could probably be used here. Originally proposed in April 2012 (see https://lwn.net/Articles/492959/, https://lwn.net/Articles/492920/). Apparently still in use via out-of-tree patches in production according to the ext4 maintainer, writing in September 2015:Unfortunately the FUSE layer rejects such flags, so more work would be needed:
Possible mechanism 2:
Introduce an ioctl that could preallocate some blocks. (Restricting it to those who have CAP_SYS_RAWIO.)
Possible mechanism 3:
Introduce a separate utility that can allocate such file on an offline (unmounted) image.
Hopefully I have shown enough research and made the intent clear. Until then I have to waste some SSD write cycles and wait somewhat longer.
The text was updated successfully, but these errors were encountered: