Bug 69121
Summary: | provide a tool and a mount option to zero out blocks unused by btrfs | ||
---|---|---|---|
Product: | File System | Reporter: | Elmar Stellnberger (estellnb) |
Component: | btrfs | Assignee: | Josef Bacik (josef) |
Status: | RESOLVED INVALID | ||
Severity: | enhancement | CC: | alan, dsterba |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.13 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Elmar Stellnberger
2014-01-21 10:57:26 UTC
This makes little or no sense. Physical drives have more sectors than they show, flash drives are managed in a completely different way, and a trojanned drive could anyway lie and report a smaller capacity in the first place. The various "trim" invalidation interfaces drives have also don't guarantee the space given back will return zeroes. Zeroing blocks is a useless exercise, other than in wearing your SSD out faster. If you don't trust your SSD encrypt on the host. Well I thought about traditional hard disks without SSD cash when I wrote about it. Nonetheless I have to consent that there will be no way of gaining full control over a hard disk unless you had an open firmware for it and likely a way to upload the firmware for verification. Up to now there is no such vendor of hdds or is there? I have the code to do the free space zeroing (mentioned on wiki under the respective project idea), but haven't sent it due to lack of the usecases besides the one mentioned above. Nevertheless, a few weeks ago when the feature was asked about again, somebody said that it would be useful for clearing free space for virtual machine images. This makes sense iff the underlying device does not support TRIM, but qcow2, virtio do, so I still don't see a reason to add the feature. I think the request was about sparse file support. You can make such a disk image with unused blocks zeroed out easily a sparse file. I believe that definitely would make sense! |