On Thu, Apr 07, 2011 at 11:05:42AM -0500, Amit Kulkarni wrote: > >> Also, depending on the usage patterns, you might have a fs where high > >> numbered inodes are used, while the fs itself is pretty empty. Filling > >> up a fs with lots of files and them removing a lot of them is an > >> example that could lead to such a situation. This diff does not speed > >> things up in such cases. > > > > ...might have an impact in my case, since I often do things like rebuilding > > the system including tons of packages on this machine, and that use case of > > course perfectly matches what you say above. I think I'll remake these file > > systems and run the test again just to satisfy my curiosity. But that'll > > have to wait until after dinner. :-) > > > > Anyway, I see improvements both in memory usage and in speed, and I see no > > obvoius malfunctions, so I'd say it's a go. > > > Hi Otto, > > Comparing your diff with FreeBSD svn (not cvs, they dropped cvs! my > bad on the initial comment) after Benny pointed this out. > > http://svn.freebsd.org/viewvc/base/head/sbin/fsck_ffs/pass1.c?revision=201708&view=markup > > Look at this comment inside the file > > /* > * This optimization speeds up future runs of fsck > * by trimming down the number of inodes in cylinder > * groups that formerly had many inodes but now have > * fewer in use. > */ > > and the commit entry by McKusick for rev 188110 > > "Update the actions previously attempted by the -D option to make them > robust. With these changes fsck is now able to detect and reliably > rebuild corrupted cylinder group maps. The -D option is no longer > necessary as it has been replaced by a prompt asking whether the > corrupted cylinder group should be rebuilt and doing so when requested. > These actions are only offered and taken when running fsck in manual > mode. Corrupted cylinder groups found during preen mode cause the fsck > to fail. > > Add the -r option to free up excess unused inodes. Decreasing the > number of preallocated inodes reduces the running time of future > runs of fsck and frees up space that can allocated to files. The -r > option is ignored when running in preen mode." > ------------------------------------------------------ > > Will you please please please integrate that part of the code too!!! > This is absolutely useful to have and is a fairly common situation. It > will make fsck better and be a good way to partially defrag your fs. > > Or did you plan to keep that for later after more testing on this diff? > > Thanks, > amit
Yes, I go step by step. -Otto