From owner-freebsd-fs@FreeBSD.ORG Fri Jan 27 00:16:24 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80AB91065673 for ; Fri, 27 Jan 2012 00:16:24 +0000 (UTC) (envelope-from ken@kdm.org) Received: from nargothrond.kdm.org (nargothrond.kdm.org [70.56.43.81]) by mx1.freebsd.org (Postfix) with ESMTP id 4858C8FC19 for ; Fri, 27 Jan 2012 00:16:23 +0000 (UTC) Received: from nargothrond.kdm.org (localhost [127.0.0.1]) by nargothrond.kdm.org (8.14.2/8.14.2) with ESMTP id q0QNnNvR000760; Thu, 26 Jan 2012 16:49:23 -0700 (MST) (envelope-from ken@nargothrond.kdm.org) Received: (from ken@localhost) by nargothrond.kdm.org (8.14.2/8.14.2/Submit) id q0QNnN4m000759; Thu, 26 Jan 2012 16:49:23 -0700 (MST) (envelope-from ken) Date: Thu, 26 Jan 2012 16:49:23 -0700 From: "Kenneth D. Merry" To: Nikolay Denev Message-ID: <20120126234923.GA712@nargothrond.kdm.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i Cc: freebsd-fs@freebsd.org Subject: Re: BIO_DELETE support for ZVOLs? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 00:16:24 -0000 On Wed, Jan 25, 2012 at 09:51:04 +0200, Nikolay Denev wrote: > I'm don't know if anyone thought about this but it seems like a > nice feature to support TRIM like functionality for ZVOLs. > > For example : if there is a sparse ZFS volume, formatted with UFS, > and you fill it up once, then the disk space used will be with the size of the ZVOL. > Then even if there is freed space on the UFS filesystem, > the ZVOL disk space allocated from the ZVOL will remain the same. > > This also will be very nice if can be supported for FC exported ZVOLs via the new CAM Target Layer. > We're (i.e. Spectra Logic) planning to do trim support for CTL. The eventual goal is to plumb it all the way down through ZFS via the file and ZVOL paths, so that ZFS frees the space, and passes the trim commands down to any component disks so they can free the blocks as well. I don't know when that'll all get done, but we're planning to do it. If anyone wants it sooner, they're welcome to help with the implementation. :) Ken -- Kenneth Merry ken@FreeBSD.org