Re: large directory entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux