]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsprogs-nlinks.patch
authorAndreas Dilger <adilger@sun.com>
Sat, 2 Feb 2008 08:25:03 +0000 (01:25 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 11 Feb 2008 02:51:05 +0000 (21:51 -0500)
commitd38215b617e947e79d15c1e0c6f32ecf5661b592
treecba2526771a90bbccbc15985627b20b4f55f915a
parenteb4c3af66e7e424f056050fa10fb675d73047fba
e2fsprogs-nlinks.patch

Add support for the DIR_NLINK feature.

This patch includes the changes required to e2fsck to understand the
nlink count changes made in the kernel. In pass2, while counting the
links for a directory, if the link count exceeds 65000, its permanently
set to EXT2_LINK_MAX + 10. In pass4, when the counted and actual nlink
counts are compared, e2fsck does not flag an error if counted links =
EXT2_NLINK_MAX + 10 and existing link count is 1.

It also handles the case when a directory had more than 65000 subdirs
and they were later deleted. The nlink count of such a directory remains
1. In pass4 if counted links are 2 and if existing nlink count = 1,
e2fsck corrects the nlink count without displaying any errors.

The file hard link count is also increased to 65000, but this cannot be
exceeded.

Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Kalpak Shah <kalpak@clusterfs.com>
e2fsck/pass2.c
e2fsck/pass3.c
e2fsck/pass4.c
lib/ext2fs/ext2_fs.h
lib/ext2fs/ext2fs.h
lib/ext2fs/icount.c