debugfs question: What does "expand" do?
tytso at mit.edu
Thu Jul 24 16:12:20 UTC 2008
On Thu, Jul 24, 2008 at 11:47:16AM -0400, Charles Riley wrote:
> What does the "expand_dir" command do in debugfs?
> All the information I can find on it just says "Expand the directory
> I googled the archives and can't find a post where someone actually used
> it to give me some context.
> If I try it in debugfs (image opened ro) it seems to want to write to
> the image.
It adds an extra (empty) directory block to a directory inode. This
something like this is used to recreate a lost+found directory with
extra empty directory blocks so that e2fsck can reattach orphaned
inodes without needing to allocate blocks from the filesystem (which
might not be available if the filesystem is 100% full), for example.
It's not normally useful for most debugfs users. (Heck, debugfs
wasn't intended to be useful for most ext3 users; it's really designed
for ext3 wizards that need to untangle badly corrupted filesystems,
and/or ext3/4 developers that are debugging new ext4 code, and/or
ext3/4 developers creating deliberately corrupted filesystems for
e2fsprogs's regression test suite.)
More information about the Ext3-users