diff options
author | Denis Vlasenko | 2006-12-26 01:25:48 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-12-26 01:25:48 +0000 |
commit | 64c54025842f205ad722675105b88044a5b6845a (patch) | |
tree | 9b5361a46d9174b8c4c12947b006acbca33dc24c /e2fsprogs/ext2fs/alloc_stats.c | |
parent | d63c3a032ade4d7a1953031d787eed044811b78c (diff) | |
download | busybox-64c54025842f205ad722675105b88044a5b6845a.zip busybox-64c54025842f205ad722675105b88044a5b6845a.tar.gz |
remove e2fsprogs. Nobody volunteered to clean up that mess
Diffstat (limited to 'e2fsprogs/ext2fs/alloc_stats.c')
-rw-r--r-- | e2fsprogs/ext2fs/alloc_stats.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/e2fsprogs/ext2fs/alloc_stats.c b/e2fsprogs/ext2fs/alloc_stats.c deleted file mode 100644 index f3ab06a..0000000 --- a/e2fsprogs/ext2fs/alloc_stats.c +++ /dev/null @@ -1,53 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * alloc_stats.c --- Update allocation statistics for ext2fs - * - * Copyright (C) 2001 Theodore Ts'o. - * - * %Begin-Header% - * This file may be redistributed under the terms of the GNU Public - * License. - * %End-Header% - * - */ - -#include <stdio.h> - -#include "ext2_fs.h" -#include "ext2fs.h" - -void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino, - int inuse, int isdir) -{ - int group = ext2fs_group_of_ino(fs, ino); - - if (inuse > 0) - ext2fs_mark_inode_bitmap(fs->inode_map, ino); - else - ext2fs_unmark_inode_bitmap(fs->inode_map, ino); - fs->group_desc[group].bg_free_inodes_count -= inuse; - if (isdir) - fs->group_desc[group].bg_used_dirs_count += inuse; - fs->super->s_free_inodes_count -= inuse; - ext2fs_mark_super_dirty(fs); - ext2fs_mark_ib_dirty(fs); -} - -void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse) -{ - ext2fs_inode_alloc_stats2(fs, ino, inuse, 0); -} - -void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse) -{ - int group = ext2fs_group_of_blk(fs, blk); - - if (inuse > 0) - ext2fs_mark_block_bitmap(fs->block_map, blk); - else - ext2fs_unmark_block_bitmap(fs->block_map, blk); - fs->group_desc[group].bg_free_blocks_count -= inuse; - fs->super->s_free_blocks_count -= inuse; - ext2fs_mark_super_dirty(fs); - ext2fs_mark_bb_dirty(fs); -} |