Whamcloud - gitweb
e2fsck: Fix inode nlink accounting that could cause PROGRAMMING BUG errors
authorTheodore Ts'o <tytso@mit.edu>
Sat, 27 Nov 2010 00:09:43 +0000 (19:09 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 30 Apr 2011 16:27:14 +0000 (12:27 -0400)
commit156b2edffd98e899683b4fd537bdd955a600cba1
tree8cb7cf6745d1b68c28da63cba6908abdd42b3405
parent274637990f2c56a3526281bd372ddca6bad71487
e2fsck: Fix inode nlink accounting that could cause PROGRAMMING BUG errors

This fixes two possible causes for the error message:

WARNING: PROGRAMMING BUG IN E2FSCK!
        OR SOME BONEHEAD (YOU) IS CHECKING A MOUNTED (LIVE) FILESYSTEM.
inode_link_info[X] is Y, inode.i_links_count is Z.  They should be the same!

One cause which can trigger this message is when an inode has an
illegal link count > 65500 --- for example, 65535.  This was the case
in the Debian Bug report #555456.

Another cause which could trigger this message is if an ext4 directory
previously had more than 65000 subdirectories (thus causing
i_link_count to be set to 1), but then some of the subdirectories were
deleted, such that i_link_count should now be the actual number of
subdirectories.

Addresses-Debian-Bug: #555456

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
e2fsck/pass4.c