Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 12:00:17 +0300
From:      Petri Helenius <petri@helenius.fi>
To:        "Steven Hartland" <killing@multiplay.co.uk>
Cc:        freebsd-fs@freebsd.org, Poul-Henning Kamp <phk@phk.freebsd.dk>
Subject:   Re: zero deleted blocks
Message-ID:  <8A6340E3-87B4-45EC-B4B2-8E705FE934E8@helenius.fi>
In-Reply-To: <66DF83E4BF514482A094F6F61E24752B@multiplay.co.uk>
References:  <48610.1344847476@critter.freebsd.dk> <66DF83E4BF514482A094F6F61E24752B@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

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@multiplay.co.uk> =
wrote:

> ----- Original Message ----- From: "Poul-Henning Kamp" =
<phk@phk.freebsd.dk>
>=20
>=20
>>> 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.
>=20
> cam da already has this option with the sysctl:-
> kern.cam.da.X.delete_method =3D ZERO
>=20
> This however requires the underlying SCSI device supports
> Write Same (WS10 or WS16) which seems to fairly rare.
>=20
> 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.
>=20
> If this was done care should be take with regards performance
> as this will be significantly slower than the current methods.
>=20
> That said if the underlying device "supports" trim / unmap
> it could interpret that how it sees fit.
>=20
>   Regards
>   Steve
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> 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.=20
> In the event of misdirection, illegible or incomplete transmission =
please telephone +44 845 868 1337
> or return the E.mail to postmaster@multiplay.co.uk.
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A6340E3-87B4-45EC-B4B2-8E705FE934E8>