lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150502002845.GE15810@dastard>
Date:	Sat, 2 May 2015 10:28:45 +1000
From:	Dave Chinner <david@...morbit.com>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Christian Kujau <lists@...dbynature.de>, linux-ext4@...r.kernel.org
Subject: Re: large directory entry

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@...morbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ