diff options
author | Theodore Ts'o <tytso@mit.edu> | 2002-01-03 03:29:19 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2002-01-03 03:29:19 -0500 |
commit | 8bd0c95908baa3af706b9e731daff9472bec74c9 (patch) | |
tree | a98b28dc42ee8981ea33b057d63c277b96babe84 /lib/ext2fs/ext2fs.h | |
parent | 5493a27dc1138d2e30193b80217a0127d247af1e (diff) | |
download | e2fsprogs-8bd0c95908baa3af706b9e731daff9472bec74c9.tar.gz |
dir_iterate.c (ext2fs_dir_iterate2, ext2fs_process_dir_block):
Add support for a new flag, DIRENT_FLAG_INCLUDE_REMOVED,
which will return deleted directory entries.
ext2fs_dir_iterate2 takes a new callback function which
is identical with the one used by
ext2fs_dblist_dir_iterate(). If the directory entry is
deleted, the callback function will be called with the
entry paraemter set to DIRENT_DELETED_FILE.
Makefile.in, alloc_stats.c (ext2fs_inode_alloc_stats,
ext2fs_block_alloc_stats): New functions which update
block/inode allocation statistics in the bitmaps, block
group descriptors, and superblock.
mkjournal.c (mkjournal_proc), mkdir.c (ext2fs_mkdir),
expanddir.c (expand_dir_proc), bb_inode.c
(clear_bad_block_proc, set_bad_block_proc,
ext2fs_update_bb_inode), alloc.c (ext2fs_alloc_block):
Update to use new block/inode allocation statistics.
Diffstat (limited to 'lib/ext2fs/ext2fs.h')
-rw-r--r-- | lib/ext2fs/ext2fs.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index 3ddd4528..bfca0326 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -300,11 +300,12 @@ struct struct_ext2_filsys { */ #define DIRENT_FLAG_INCLUDE_EMPTY 1 - +#define DIRENT_FLAG_INCLUDE_REMOVED 2 #define DIRENT_DOT_FILE 1 #define DIRENT_DOT_DOT_FILE 2 #define DIRENT_OTHER_FILE 3 +#define DIRENT_DELETED_FILE 4 /* * Inode scan definitions @@ -442,6 +443,10 @@ extern errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start, extern errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal, char *block_buf, blk_t *ret); +/* alloc_stats.c */ +void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse); +void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse); + /* alloc_tables.c */ extern errcode_t ext2fs_allocate_tables(ext2_filsys fs); extern errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, @@ -603,6 +608,18 @@ extern errcode_t ext2fs_dir_iterate(ext2_filsys fs, char *buf, void *priv_data), void *priv_data); +extern errcode_t ext2fs_dir_iterate2(ext2_filsys fs, + ext2_ino_t dir, + int flags, + char *block_buf, + int (*func)(ext2_ino_t dir, + int entry, + struct ext2_dir_entry *dirent, + int offset, + int blocksize, + char *buf, + void *priv_data), + void *priv_data); /* dupfs.c */ extern errcode_t ext2fs_dup_handle(ext2_filsys src, ext2_filsys *dest); |