From: Dave Chinner <david@fromorbit.com>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Christian Kujau <lists@nerdbynature.de>, linux-ext4@vger.kernel.org
Subject: Re: large directory entry
Date: Sat, 2 May 2015 10:28:45 +1000 [thread overview]
Message-ID: <20150502002845.GE15810@dastard> (raw)
In-Reply-To: <20150501143147.GB9936@thunk.org>
On Fri, May 01, 2015 at 10:31:47AM -0400, Theodore Ts'o wrote:
> On Thu, Apr 30, 2015 at 10:02:58PM -0700, Christian Kujau wrote:
> > Notice the "18M" entry for "." - I realize this is a directory for
> > temporary files, meaning that lots of files are generated here, but
> > the server is not _that_ busy; according to lsof(8) no files are
> > currently open in /var/lib/php5 and only the "sessions" directory
> > contains 100 files, there are far less files below the other directories.
>
> That's simply because shrinking directories while the file system is
> mounted is... tricky. At some point we might try to get this
> supported, but until we do, there are two workarounds:
.....
> I'm not sure I would call this a bug; it's a long standing proper of
> ext2/3/4, the BSD FFS, etc., which is directories can't get shurnk by
> the file system. At some point the directory had enough files in it
> that it grew to that size, and once having grown to that size, it
> won't shirnk on its own.
Interesting - I didn't realise that ext4 had this property. I'm so
used to XFS where the directory structure grows and shrinks
according to it's contents. I learnt something new about ext4 today!
> It would be possible to enhance ext4 to be able to shrink directories
> on-line, but it would require adding a new file system (to allow
> sparse directories),
Yeah, XFS directories are sparsely mapped files with internal
indexes to maintain constant offset mappings and index free space.
It is rather complex... :/
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
prev parent reply other threads:[~2015-05-02 0:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-01 5:02 large directory entry Christian Kujau
2015-05-01 14:31 ` Theodore Ts'o
2015-05-01 16:59 ` Christian Kujau
2015-05-02 0:28 ` Dave Chinner [this message]
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=20150502002845.GE15810@dastard \
--to=david@fromorbit.com \
--cc=linux-ext4@vger.kernel.org \
--cc=lists@nerdbynature.de \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox