From owner-freebsd-hackers@freebsd.org Mon Dec 14 21:02:02 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 872AFA44DE2 for ; Mon, 14 Dec 2015 21:02:02 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C1ED1EE2 for ; Mon, 14 Dec 2015 21:02:01 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Mon, 14 Dec 2015 21:01:56 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tBEL1xEj019015; Mon, 14 Dec 2015 14:01:59 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1450126918.25138.17.camel@freebsd.org> Subject: Re: Initiate TRIM/DELETE to a range of blocks from userland? From: Ian Lepore To: Maxim Sobolev , freebsd-hackers@freebsd.org Date: Mon, 14 Dec 2015 14:01:58 -0700 In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 21:02:02 -0000 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