From owner-freebsd-fs@FreeBSD.ORG Mon Apr 10 18:11:03 2006 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0103416A400 for ; Mon, 10 Apr 2006 18:11:03 +0000 (UTC) (envelope-from eksffa@freebsdbrasil.com.br) Received: from capeta.freebsdbrasil.com.br (vrrp.freebsdbrasil.com.br [200.210.70.30]) by mx1.FreeBSD.org (Postfix) with SMTP id BFF2F43D48 for ; Mon, 10 Apr 2006 18:10:58 +0000 (GMT) (envelope-from eksffa@freebsdbrasil.com.br) Received: (qmail 10297 invoked by uid 0); 10 Apr 2006 15:10:54 -0300 Received: from eksffa@freebsdbrasil.com.br by capeta.freebsdbrasil.com.br by uid 82 with qmail-scanner-1.22 (spamassassin: 2.64. Clear:RC:1(200.210.42.5):. Processed in 101.894297 secs); 10 Apr 2006 18:10:54 -0000 Received: from unknown (HELO ?10.69.69.69?) (200.210.42.5) by capeta.freebsdbrasil.com.br with SMTP; 10 Apr 2006 15:09:12 -0300 Message-ID: <443A9F3D.6090008@freebsdbrasil.com.br> Date: Mon, 10 Apr 2006 15:09:01 -0300 From: Patrick Tracanelli Organization: FreeBSD Brasil LTDA User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051013 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <1144687418.11014.9.camel@diegows> <443A9C26.4060103@centtech.com> In-Reply-To: <443A9C26.4060103@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: How a file is deleted in ufs2? 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: Mon, 10 Apr 2006 18:11:03 -0000 Eric Anderson wrote: > Diego Woitasen wrote: > >> I want to know how a file is deleted in a ufs2 filesystem, specifically >> what happen with the information in the inode. The information is >> deleted to or the inode is marked as free but the information (uid, gid, >> blocks, times, etc) remains there? >> >> I read the chapter 8 of 'Design and implementation of FreeBSD" and "a >> Fast file system for Unix", but i can't see the answer. >> >> Reading the code is an interesting choice, but is the last resource :) > > > > I'm 100% certain here, but looking at the code, I don't think much > happens besides freeing the inode and clearing it for re-use. The > on-disk data remains. > > > Eric When the story ends, you have char *f unlink(f); in the code. So reading "man 2 unlink" might be a good start point. If reading McKusick's book and the syscall man page dont make it clear, you will have no better choice other than reading the code yourself :D -- Patrick Tracanelli FreeBSD Brasil LTDA. (31) 3281-9633 / 3281-3547 316601@sip.freebsdbrasil.com.br http://www.freebsdbrasil.com.br "Long live Hanin Elias, Kim Deal!"