Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 2004 14:01:29 -0400
From:      Jason DiCioccio <jd@ods.org>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Question regarding reported directory sizes.
Message-ID:  <DBA76E45D93EA7C22D2BCDCB@[10.102.0.67]>
In-Reply-To: <20040525154242.GL75036@dan.emsphone.com>
References:  <A4758F237E80785AEBADF883@[10.102.0.67]> <20040525154242.GL75036@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Dan..  However, this does not appear to be happening...  I could of 
course create a new directory and move everything into it as was suggested 
earlier.  However, this is more of a curiosity thing than anything.. I'm 
wondering if at any point the entry does become truncated, because it 
hasn't happened yet, even after the creation of files.

The OS release is: 5.2-CURRENT from May 12th

Thanks!
Jason DiCioccio

--On Tuesday, May 25, 2004 10:42:42 -0500 Dan Nelson 
<dnelson@allantgroup.com> wrote:

> In the last episode (May 25), Jason DiCioccio said:
>> I know this question may seem silly..  However, here's my scenario.
>>
>> I have a very large directory (say, a mail spool) whose directory entry
>> is  approx 606K..
>> drwx------  5 cyrus  cyrus  606208 May 25 10:29 .
>> Now.. That directory had a lot of files in it.  However, after deleting
>> all  of the files in that directory, the directory entry's size stays
>> the same.  I realize this is fairly unimportant, however is there a way
>> to 'garbage  collect' that directory entry and all others like it?
>
> Create another file in the directory, and you'll see it shrink down.
> The truncation code is in the file create codepath, not the delete one
> (which means it's not constantly trying to shrink the directory as you
> delete files).
>
> --
> 	Dan Nelson
> 	dnelson@allantgroup.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DBA76E45D93EA7C22D2BCDCB>