zero deleted blocks
Petri Helenius
petri at helenius.fi
Mon Aug 13 09:00:34 UTC 2012
Obviously the most elegant way would be for KVM, Xen and VMware to support TRIM/UNMAP...
Pete
On Aug 13, 2012, at 11:58 , "Steven Hartland" <killing at multiplay.co.uk> wrote:
> ----- Original Message ----- From: "Poul-Henning Kamp" <phk at phk.freebsd.dk>
>
>
>>> I think TRIM support in UFS can be extended to zero-out the deleted
>>> blocks, with relatively small amount of work. Basically, in
>>> ufs/ffs/ffs_alloc.c:ffs_blkfree(), a BIO_WRITE of zero buffer shall be
>>> issued instead of BIO_DELETE.
>> It would be a better idea to give geom_disk a per-disk option to
>> convert BIO_DELETE to writes of zeros.
>
> cam da already has this option with the sysctl:-
> kern.cam.da.X.delete_method = ZERO
>
> This however requires the underlying SCSI device supports
> Write Same (WS10 or WS16) which seems to fairly rare.
>
> I'm not aware of any an equivalent ATA command, but it would
> be possible to have both use a standard write to achieve that.
>
> If this was done care should be take with regards performance
> as this will be significantly slower than the current methods.
>
> That said if the underlying device "supports" trim / unmap
> it could interpret that how it sees fit.
>
> Regards
> Steve
>
> ================================================
> This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it.
> In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
> or return the E.mail to postmaster at multiplay.co.uk.
>
More information about the freebsd-fs
mailing list