Initiate TRIM/DELETE to a range of blocks from userland?

Ian Lepore ian at freebsd.org
Mon Dec 14 21:02:02 UTC 2015


On Mon, 2015-12-14 at 12:52 -0800, Maxim Sobolev wrote:
> Hi guys, let's say I have a raw device (e.g. "ada1") and I want to
> generate BIO_DELETE to a range of offsets on that device. Is there
> any
> way to do it now, and if not, what do you think would be the most
> proper way to get something like this implemented? New ioctl and some
> new flag for the dd(1)?

Looks like there's already an ioctl, DIOCGDELETE in sys/disk.h, used by
newfs -E via the berase() routine in libufs.

-- Ian



More information about the freebsd-hackers mailing list