Age | Commit message (Collapse) | Author |
|
|
|
* hyper.c (get_hypermetadata): Avoid overflow in calculation of disk
size vs superblock-specified requirement.
Add a warning for wasted disk blocks after last filesystem block.
|
|
|
|
* dir.c (ext2_file_type): #if 0 out this variable.
(diskfs_get_directs): #if 0 out code to interpret file_type field
and set d_type. Instead, always return DT_UNKNOWN for now.
|
|
|
|
* dir.c (file_type_ext2): #if 0 out.
(diskfs_direnter_hard): #if 0 out code to set file_type field in
directory entries. Instead, always set it to zero.
|
|
|
|
* bitmap.c (ffz): Subtract one from (1-origin) result of ffs to get
our (0-origin) result.
* Makefile (LCLHDRS): bitmap.h -> bitmap.c
|
|
* ext2fs.h (test_bit, set_bit, clear_bit): Rewritten to operate on
32-bit words instead of bytes.
* ext2fs.h (group_desc): Inline function replaced with macro.
(group_desc_image): New variable.
* hyper.c (get_hypermetadata): Initialize it.
* ext2fs.h (sblock_block): Declare new variable.
(SBLOCK_LBLOCK): Macro removed.
(SBLOCK_OFFS): Define in terms of sblock_block.
* ext2fs.c (options): Add --sblock/-S.
(parse_opt): Parse it to set sblock_block.
* hyper.c (sblock_block): New variable.
(get_hypermetadata): Use sblock_block instead of constant SBLOCK_BLOCK.
* hyper.c (get_hypermetadata): Use EXT2_MAX_BLOCK_SIZE instead of
hard-wired 8192. Don't use ffs to compute log2_block_size, and don't
check for the impossible case of non-power-of-two block size (the
block size specification we start with is given as a power of two!).
* ext2fs.h (block_size): Change type to unsigned int.
(BLOCKSIZE_SCALE): Just use SBLOCK->s_log_block_size directly.
* hyper.c (get_hypermetadata): Fix printf formats to silence warning.
* dir.c (dirscanblock): Likewise.
|
|
* truncate.c (diskfs_truncate): Add missing call to
diskfs_end_catch_exception.
|
|
* ext2fs.h (sblock_block): Declare new variable.
(SBLOCK_LBLOCK): Macro removed.
(SBLOCK_OFFS): Define in terms of sblock_block.
* ext2fs.c (options): Add --sblock/-S.
(parse_opt): Parse it to set sblock_block.
* hyper.c (sblock_block): New variable.
(get_hypermetadata): Use sblock_block instead of constant SBLOCK_BLOCK.
* ext2fs.c (options): List --debug/-D unconditionally, adding to help
text #ifndef EXT2FS_DEBUG
(parse_opt): Always grok -D. #ifndef EXT2FS_DEBUG, reject it with
message saying debugging support not compiled in.
|
|
* Makefile (LCLHDRS): bitmap.h -> bitmap.c
|
|
* hyper.c (get_hypermetadata): Use EXT2_MAX_BLOCK_SIZE instead of
hard-wired 8192. Don't use ffs to compute log2_block_size, and don't
check for the impossible case of non-power-of-two block size (the
block size specification we start with is given as a power of two!).
* ext2fs.h (block_size): Change type to unsigned int.
(BLOCKSIZE_SCALE): Just use SBLOCK->s_log_block_size directly.
* hyper.c (get_hypermetadata): Fix printf formats to silence warning.
* dir.c (dirscanblock): Likewise.
|
|
* ext2fs.h (group_desc): Inline function replaced with macro.
(group_desc_image): New variable.
* hyper.c (get_hypermetadata): Initialize it.
* ext2fs.h (sblock_block): Declare new variable.
(SBLOCK_LBLOCK): Macro removed.
(SBLOCK_OFFS): Define in terms of sblock_block.
* ext2fs.c (options): Add --sblock/-S.
(parse_opt): Parse it to set sblock_block.
* hyper.c (sblock_block): New variable.
(get_hypermetadata): Use sblock_block instead of constant SBLOCK_BLOCK.
* hyper.c (get_hypermetadata): Use EXT2_MAX_BLOCK_SIZE instead of
hard-wired 8192. Don't use ffs to compute log2_block_size, and don't
check for the impossible case of non-power-of-two block size (the
block size specification we start with is given as a power of two!).
* ext2fs.h (block_size): Change type to unsigned int.
(BLOCKSIZE_SCALE): Just use SBLOCK->s_log_block_size directly.
* hyper.c (get_hypermetadata): Fix printf formats to silence warning.
* dir.c (dirscanblock): Likewise.
|
|
|
|
* dir.c (file_type_ext2): New const variable, map DT_* -> EXT2_FT_*.
(diskfs_direnter_hard): Move initialization of directory entry content
fields out of switch; use memcpy or memmove as appropriate, instead of
bcopy. Set file_type field in new directory entry to appropriate
type for the node, or to zero if the filesystem doesn't have the
EXT2_FEATURE_INCOMPAT_FILETYPE flag set.
|
|
* bitmap.c (ffz): Don't subtract one (duh).
|
|
|
|
* ext2fs.h (SBLOCK_LBLOCK): New macro, filesystem block number of sb.
(BLOCKSIZE_SCALE): New macro for converting min-blocks to fs blocks.
(group_desc): Fix calculation of offset from superblock, so it works
properly with block_size != EXT2_MIN_BLOCK_SIZE.
* ext2fs.h (EXT2FS_EI): New macro, use it for all extern inlines.
|
|
|
|
* bitmap.c (count_free, find_next_zero_bit, find_first_zero_bit):
Make these all static inline.
(ffz, ffz_nibble_map): Function and variable removed.
(ffz): Replace decl with macro defined in terms of ffs.
* ext2fs.h (count_free, find_next_zero_bit, find_first_zero_bit, ffz):
Remove these declarations.
* Makefile (SRCS): Remove bitmap.c.
(LCLHDRS): Add bitmap.c here instead.
* balloc.c, ialloc.c: #include "bitmap.c" here.
|
|
|
|
* bitmap.c (memscan): Function removed.
* ext2fs.h: Removed its decl.
* balloc.c (memscan): New static function, defined using memchr.
|
|
|
|
|
|
* Makefile (makemode): server -> servers.
(targets): Replaced with target; remove ext2fs.static.
(ext2fs.static-LDFLAGS): Variable removed.
(ext2fs, ext2fs.static): Remove deps.
|
|
* dir.c (diskfs_lookup_hard): Pass additional parameter to
diskfs_get_filemap.
(diskfs_dirempty): Likewise.
* truncate.c (force_delayed_copies): Likewise.
* pager.c (diskfs_get_filemap): Accept additional parameter.
|
|
|
|
* pager.c (file_pager_write_page): Don't report errors on writes
that extend past NODE->allocsize. This avoids a race between sync
and truncate. Reported by Mark Kettenis <kettenis@wins.uva.nl>.
|
|
|
|
* balloc.c (ext2_free_blocks): Handle freeing across group boundary,
as Linux 2.3.14 does.
* balloc.c (ext2_check_blocks_bitmap): If RO_COMPAT_SPARSE_SUPER
feature flag is set, or if group number is not a power of 3, 5, or 7
(I don't know why; this is what Linux 2.3.14 does), skip tests for
superblocks and descriptor blocks being free in bitmap.
* balloc.c (ext2_new_block): Take new arg PREALLOC_GOAL.
Use that instead of hard-coded 8 as maximum of blocks to preallocate.
Also test that instead of PREALLOC_COUNT to decide whether to
try any preallocation at all.
* getblk.c (ext2_alloc_block): Pass new arg to ext2_new_block.
Use EXT2_DEFAULT_PREALLOC_BLOCKS as default (replaces hard-coded 8);
For a regular file, use SBLOCK->s_prealloc_blocks before default.
For a directory, use SBLOCK->s_dir_prealloc_blocks if the
EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is set, otherwise zero.
* inode.c (diskfs_set_translator): Pass new arg (zero).
|
|
* inode.c (read_node): Don't set INFO->i_version.
Extract INFO->i_dir_acl value only for a directory;
otherwise use zero and instead extract INFO->i_high_size.
Fail with EFBIG if INFO->i_high_size is nonzero.
* inode.c (write_node): Get i_flags from NP->dn->info instead of from
the disk inode, so we can have modified the in-core version.
* dir.c (diskfs_direnter_hard, diskfs_dirremove_hard,
diskfs_dirrewrite_hard): Clear EXT2_BTREE_FL flag bit from
DP->dn->info.i_flags after modifying the directory (this is what
Linux 2.3.14 does).
* inode.c (read_node): i_version -> i_generation
* inode.c (write_node): Likewise.
* balloc.c (ext2_new_block): Take new arg PREALLOC_GOAL.
Use that instead of hard-coded 8 as maximum of blocks to preallocate.
Also test that instead of PREALLOC_COUNT to decide whether to
try any preallocation at all.
* getblk.c (ext2_alloc_block): Pass new arg to ext2_new_block.
Use EXT2_DEFAULT_PREALLOC_BLOCKS as default (replaces hard-coded 8);
For a regular file, use SBLOCK->s_prealloc_blocks before default.
For a directory, use SBLOCK->s_dir_prealloc_blocks if the
EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is set, otherwise zero.
* inode.c (diskfs_set_translator): Pass new arg (zero).
|
|
* ialloc.c (diskfs_alloc_node): Propagate initial value of i_flags
from directory, as Linux 2.3.14 does.
|
|
* ext2_fs.h, ext2_fs_i.h: Replaced with Linux 2.3.14 versions.
* ext2fs.h (i_mode_high): New macro, missing from ext_fs.h.
|
|
* balloc.c (ext2_new_block): Take new arg PREALLOC_GOAL.
Use that instead of hard-coded 8 as maximum of blocks to preallocate.
Also test that instead of PREALLOC_COUNT to decide whether to
try any preallocation at all.
* getblk.c (ext2_alloc_block): Pass new arg to ext2_new_block.
Use EXT2_DEFAULT_PREALLOC_BLOCKS as default (replaces hard-coded 8);
For a regular file, use SBLOCK->s_prealloc_blocks before default.
For a directory, use SBLOCK->s_dir_prealloc_blocks if the
EXT2_FEATURE_COMPAT_DIR_PREALLOC flag is set, otherwise zero.
* inode.c (diskfs_set_translator): Pass new arg (zero).
|
|
* inode.c (write_node): Get i_flags from NP->dn->info instead of from
the disk inode, so we can have modified the in-core version.
* dir.c (diskfs_direnter_hard, diskfs_dirremove_hard,
diskfs_dirrewrite_hard): Clear EXT2_BTREE_FL flag bit from
DP->dn->info.i_flags after modifying the directory (this is what
Linux 2.3.14 does).
* dir.c: Replace `struct ext2_dir_entry' with `struct ext2_dir_entry_2'
in all uses.
(ext2_file_type): New static const variable.
(diskfs_get_directs): Set d_type member based on file_type field in
directory entry.
|
|
|
|
* dir.c (diskfs_get_directs): Fix sloppy bugs in last change.
* hyper.c (allocate_mod_map): Likewise.
* pager.c (get_page_buf): Likewise.
|
|
* dir.c (diskfs_get_directs): Use mmap instead of vm_allocate.
* hyper.c (allocate_mod_map): Likewise.
(get_hypermetadata): Likewise.
* pager.c (get_page_buf): Likewise.
* hyper.c (diskfs_readonly_changed): Use mprotect instead of
vm_protect.
|
|
|
|
* ext2fs.h: Add #include <sys/mman.h> for munmap decl.
|
|
* dir.c (diskfs_lookup_hard): Use munmap instead of vm_deallocate.
(diskfs_direnter_hard): Likewise.
(diskfs_dirremove_hard): Likewise.
(diskfs_dirrewrite_hard): Likewise.
(diskfs_dirempty): Likewise.
(diskfs_drop_dirstat): Likewise.
(diskfs_get_directs): Likewise.
* hyper.c (allocate_mod_map): Likewise.
(get_hypermetadata): Likewise.
* pager.c (free_page_buf): Likewise.
* truncate.c (poke_pages): Likewise.
|
|
* hyper.c (diskfs_readonly_changed): Adjust whether the store
should permit writes too.
|
|
|
|
* pager.c (free_page_buf): Fix type cast.
|
|
* pager.c: Clamp the number of free pages we keep around to some
reasonably small value. Patch from Mark Kettenis
<kettenis@wins.uva.nl>.
1999-06-15 Thomas Bushnell, BSG <tb@mit.edu>
* inode.c (diskfs_validate_flags_change): Invert sense of test wrt
bits that haven't yet been defined. Reported by Kalle Olavi
Niemitalo <tosi@ees2.oulu.fi>.
|
|
|
|
* ialloc.c (diskfs_alloc_node): Frob printf format to suppress warning.
* getblk.c (ext2_getblk): Likewise.
* balloc.c (ext2_free_blocks): Likewise.
* hyper.c (get_hypermetadata): Likewise.
|
|
* ext2fs.c (main): Include store size in panic msg when it's too small.
|
|
|