Date: Mon, 14 Dec 2015 13:54:55 -0800 From: Maxim Sobolev <sobomax@FreeBSD.org> To: Ian Lepore <ian@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Initiate TRIM/DELETE to a range of blocks from userland? Message-ID: <CAH7qZft%2BKSOgk5CLC%2BDQ1tpvmN9TivSQj1s3dPtefd4LKpCUiw@mail.gmail.com> In-Reply-To: <1450126918.25138.17.camel@freebsd.org> References: <CAH7qZfvTQ4a409SVO2Aqv9qP4SUfxrCL4pduk7AqY4%2BeAeTd%2BA@mail.gmail.com> <1450126918.25138.17.camel@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, looks like somebody already written tool that does precisely that: https://unix4lyfe.org/gitweb/trim/tree Gotta see maybe make a port out of it. On Dec 14, 2015 1:02 PM, "Ian Lepore" <ian@freebsd.org> wrote: > 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 > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAH7qZft%2BKSOgk5CLC%2BDQ1tpvmN9TivSQj1s3dPtefd4LKpCUiw>