From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 16 19:01:12 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8654C106566C for ; Sat, 16 Jun 2012 19:01:12 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0AEF18FC14 for ; Sat, 16 Jun 2012 19:01:11 +0000 (UTC) Received: by bkvi18 with SMTP id i18so3881912bkv.13 for ; Sat, 16 Jun 2012 12:01:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hQG5JyDT8UaiJOUY9MiN5CwC1WIPxi4RjNleEnF0R54=; b=S7v7rQN/7FEIE8YZNZGGXjuZU4dyhNrUpZcXtVTQQlRxdTEDYjSSUnutt2SiCTyehY auOGraP6tcflD1kP27DuEvSBllRKWYlPwM/xNnvcLjhnbbQR3+CDA8hvFkvRcejMm0Tz dyD/lO243pXKNKpkuF+QWZNxqYoVIebbSQJjcVrGctq98U6I3WJWkDdnZ415FklfddJk /LkdV9xp5D6LJEGH1DXXlb3VJhykA8lOp3KON69LvgZlf8EBqOLKNRZFfvaAIJqELfhj i5p196ZJVPJF7JtWM9C4jXjNRyjEjofVJI/cjROre6+LgIc/tH7eC/GpzQgKLZhSQNu1 LqXw== MIME-Version: 1.0 Received: by 10.204.154.214 with SMTP id p22mr4252920bkw.115.1339873270679; Sat, 16 Jun 2012 12:01:10 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Sat, 16 Jun 2012 12:01:10 -0700 (PDT) Received: by 10.204.171.138 with HTTP; Sat, 16 Jun 2012 12:01:10 -0700 (PDT) In-Reply-To: References: <4FD94240.6060806@delphij.net> Date: Sat, 16 Jun 2012 20:01:10 +0100 Message-ID: From: Chris Rees To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org, Xin LI Subject: Re: BIO_DELETE equivalent for file on FFS filesystem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jun 2012 19:01:12 -0000 On Jun 14, 2012 5:49 AM, "Wojciech Puchar" wrote: >>> >>> file to take 900MB or... can i call some system function to "punch" >>> holes? >> >> >> I think you can only truncate the file at this time, pretty much like >> brk() works for memory. > > > > BAD. suppose i keep windoze VM image on filesystem which takes 10GB but uses 5GB. > > i could write simple program to find out what blocks are unused and then...do nothing. > What if you cp it? Chris