Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2012 09:58:08 +0100
From:      "Steven Hartland" <killing@multiplay.co.uk>
To:        "Konstantin Belousov" <kostikbel@gmail.com>, "Poul-Henning Kamp" <phk@phk.freebsd.dk>
Cc:        freebsd-fs@freebsd.org, Petri Helenius <petri@helenius.fi>
Subject:   Re: zero deleted blocks
Message-ID:  <66DF83E4BF514482A094F6F61E24752B@multiplay.co.uk>
References:  <48610.1344847476@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- 
From: "Poul-Henning Kamp" <phk@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@multiplay.co.uk.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?66DF83E4BF514482A094F6F61E24752B>