All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timo Sirainen <tss@iki.fi>
To: linux-kernel@vger.kernel.org
Subject: ext3/ext4 directories don't shrink after deleting lots of files
Date: Thu, 14 May 2009 18:02:03 -0400	[thread overview]
Message-ID: <1242338523.6933.664.camel@timo-desktop> (raw)

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

I've noticed that if you create e.g. 100k files to a directory and then
delete the files, the directory entry still seems to take a couple of
megabytes. Later whenever accessing the (almost empty) directory it can
take a few seconds to load it into cache.

Is there a way to shrink the directory somehow without having to rmdir()
it? Would be nice if kernel did it automatically, but I could live with
a manual userspace syscall/tool as well.


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2009-05-14 22:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-14 22:02 Timo Sirainen [this message]
2009-05-15  0:32 ` ext3/ext4 directories don't shrink after deleting lots of files Josef Bacik
2009-05-15  0:45   ` Timo Sirainen
2009-05-15 10:58     ` Theodore Tso
2009-05-15 17:29       ` Timo Sirainen
2009-05-15 18:25         ` Theodore Tso
2009-05-16  9:42       ` david
2009-05-17 21:33     ` Theodore Tso
2009-05-18  2:49       ` david
2009-05-18  3:21         ` Theodore Tso
2009-08-22 14:20       ` [PATCH 1/1] dir shrink (was Re: ext3/ext4 directories don't shrink after deleting lots of files) Andreas Schlick
2009-08-23  3:10         ` Andreas Dilger
2009-08-28 22:18           ` Andreas Schlick
2009-08-28 23:11             ` Andreas Dilger
2009-08-30 19:15               ` [PATCH 1/1] dir shrink Andreas Schlick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242338523.6933.664.camel@timo-desktop \
    --to=tss@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.