• Theodore Y. Ts'o's avatar
    [PATCH] Fixup Orlov block allocator for ext2 · 4be68d9c
    Theodore Y. Ts'o authored
    I finally had time to look at the Orlov patches, and found a memory
    leak; sbi->s_debts wasn't getting freed when the filesystem was
    getting unmounted, or in the error path.
    
    This patch also makes the following cleanups/changes:
    
    1) Use sbi->s_debts instead of sbi->debts --- all other fields in
    	struct ext2_sb_info are prefixed by "s_", so this makes things
    	consistent.
    
    2) Add support for a new inode flag, EXT2_TOPDIR_FL, which tells tells
    	the Orlov allocator to treat that directory as the top of
    	directory hierarchies, so that new subdirectories created in
    	that directory should be spread apart.  System administrators
    	should set this flag on directories like /usr/src, /usr/home, etc.
    
    3) Add a mount-time flag, -o oldalloc, which forces the use of the old
    	inode (pre-Orlov) allocator.  This makes it easier to do
    	comparison benchmarks, and in case people want to use the old
    	algorithm.
    4be68d9c
super.c 28.7 KB