lwext4.git
8 years agoDo not verify checksum upon seeking in the directory.
ngkaho1234 [Thu, 29 Oct 2015 10:29:20 +0000 (18:29 +0800)]
Do not verify checksum upon seeking in the directory.

8 years agoext4_dbg now shows line number
ngkaho1234 [Thu, 29 Oct 2015 10:13:12 +0000 (18:13 +0800)]
ext4_dbg now shows line number

8 years agoFIX: fake inode checksum failing message.
ngkaho1234 [Thu, 29 Oct 2015 09:56:21 +0000 (17:56 +0800)]
FIX: fake inode checksum failing message.

8 years agoAdd ext4_dir_checksum_verify prototype
ngkaho1234 [Thu, 29 Oct 2015 09:23:45 +0000 (09:23 +0000)]
Add ext4_dir_checksum_verify prototype

8 years agoMETADATA_CSUM: linear directory checksum verification added
ngkaho1234 [Thu, 29 Oct 2015 05:55:20 +0000 (05:55 +0000)]
METADATA_CSUM: linear directory checksum verification added

8 years agoMETADATA_CSUM: HTree directory checksum verification added
ngkaho1234 [Thu, 29 Oct 2015 05:55:02 +0000 (05:55 +0000)]
METADATA_CSUM: HTree directory checksum verification added

8 years agoFix compile error
gkostka [Wed, 28 Oct 2015 18:31:21 +0000 (19:31 +0100)]
Fix compile error

8 years agoMETADATA_CSUM: simple extent implementation checksum verification added
ngkaho1234 [Wed, 28 Oct 2015 14:20:52 +0000 (14:20 +0000)]
METADATA_CSUM: simple extent implementation checksum verification added

8 years agoext4_extent_full.c: print warning messages when extent block checksum verification...
ngkaho1234 [Wed, 28 Oct 2015 14:20:10 +0000 (14:20 +0000)]
ext4_extent_full.c: print warning messages when extent block checksum verification fails

8 years agoMETADATA_CSUM: inode and block group descriptor checksum verification added
ngkaho1234 [Wed, 28 Oct 2015 13:54:37 +0000 (13:54 +0000)]
METADATA_CSUM: inode and block group descriptor checksum verification added

8 years agoDon't access those checksum fields if metadata_csum is not enabled.
ngkaho1234 [Wed, 28 Oct 2015 13:23:53 +0000 (13:23 +0000)]
Don't access those checksum fields if metadata_csum is not enabled.

8 years agoRemove BIG FAT NOTE from ext4_balloc.c and ext4_ialloc.c
ngkaho1234 [Wed, 28 Oct 2015 13:17:23 +0000 (13:17 +0000)]
Remove BIG FAT NOTE from ext4_balloc.c and ext4_ialloc.c

8 years agoMETADATA_CSUM: inode bitmap verification added
ngkaho1234 [Wed, 28 Oct 2015 10:14:36 +0000 (18:14 +0800)]
METADATA_CSUM: inode bitmap verification added

8 years agoMETADATA_CSUM: block bitmap verification added
ngkaho1234 [Wed, 28 Oct 2015 10:14:22 +0000 (18:14 +0800)]
METADATA_CSUM: block bitmap verification added

8 years agoDisable checksum calculation when CONFIG_META_CSUM_ENABLE is off
gkostka [Wed, 28 Oct 2015 08:06:41 +0000 (09:06 +0100)]
Disable checksum calculation when CONFIG_META_CSUM_ENABLE is off

8 years agoFIX: simple extent implementation overwriting the inode block.
ngkaho1234 [Wed, 28 Oct 2015 02:54:33 +0000 (02:54 +0000)]
FIX: simple extent implementation overwriting the inode block.

8 years agoUpdate readme.mediawiki
gkostka [Tue, 27 Oct 2015 21:36:27 +0000 (22:36 +0100)]
Update readme.mediawiki

8 years agoIntroduce CONFIG_META_CSUM_ENABLE flag
gkostka [Tue, 27 Oct 2015 20:28:47 +0000 (21:28 +0100)]
Introduce CONFIG_META_CSUM_ENABLE flag

For ext2 & ext3 feature set metadata checksum could be disabled at
compile time

8 years agoIntroduce EXT4_CRC32_INIT instead of ~0
gkostka [Tue, 27 Oct 2015 19:56:04 +0000 (20:56 +0100)]
Introduce EXT4_CRC32_INIT instead of ~0

Using ~0 is potential dangerous in 8/16 bit architectures

8 years agoFix compile warnings
gkostka [Tue, 27 Oct 2015 19:47:21 +0000 (20:47 +0100)]
Fix compile warnings

8 years agoFix compile error when simple extent enabled
gkostka [Tue, 27 Oct 2015 19:46:53 +0000 (20:46 +0100)]
Fix compile error when simple extent enabled

8 years agoRefactor ext4_offsetof to offsetof and move to ext4_types.h
gkostka [Tue, 27 Oct 2015 19:40:36 +0000 (20:40 +0100)]
Refactor ext4_offsetof to offsetof and move to ext4_types.h

8 years agoRefactoring superblock features getters
gkostka [Tue, 27 Oct 2015 19:34:37 +0000 (20:34 +0100)]
Refactoring superblock features getters

8 years agoFeature set definitions refactoring (shorter names)
gkostka [Tue, 27 Oct 2015 19:15:59 +0000 (20:15 +0100)]
Feature set definitions refactoring (shorter names)

8 years agoRefactor FEATURE_INCOMPAT to FINCOM
gkostka [Tue, 27 Oct 2015 19:02:13 +0000 (20:02 +0100)]
Refactor FEATURE_INCOMPAT to FINCOM

8 years agoRefactor FEATURE_RO to FRO
gkostka [Tue, 27 Oct 2015 18:51:49 +0000 (19:51 +0100)]
Refactor FEATURE_RO to FRO

8 years agoRefactor FEATURE_COMPAT to FCOM
gkostka [Tue, 27 Oct 2015 18:47:52 +0000 (19:47 +0100)]
Refactor FEATURE_COMPAT to FCOM

8 years agoFIX: checksum is not calculated for just-initialized bitmap.
ngkaho1234 [Tue, 27 Oct 2015 14:50:44 +0000 (22:50 +0800)]
FIX: checksum is not calculated for just-initialized bitmap.

8 years agoFIX: ext4_extent.c failed to be compiled.
ngkaho1234 [Tue, 27 Oct 2015 14:25:17 +0000 (22:25 +0800)]
FIX: ext4_extent.c failed to be compiled.

8 years agoFIX: wrong accounting caused by EXT2_BG_INODE_ZEROED
ngkaho1234 [Tue, 27 Oct 2015 12:49:44 +0000 (20:49 +0800)]
FIX: wrong accounting caused by EXT2_BG_INODE_ZEROED

8 years agoext4_balloc_bitmap_csum: should be blocks_per_group / 8.
ngkaho1234 [Tue, 27 Oct 2015 10:37:57 +0000 (18:37 +0800)]
ext4_balloc_bitmap_csum: should be blocks_per_group / 8.

8 years agoFIX: potential checksum failed bug in ext4_extent_full.c when METADATA_CSUM is not...
ngkaho1234 [Tue, 27 Oct 2015 10:06:26 +0000 (18:06 +0800)]
FIX: potential checksum failed bug in ext4_extent_full.c when METADATA_CSUM is not enabled

8 years agoFIX: directory HTree node checksum is not assigned correctly.
ngkaho1234 [Tue, 27 Oct 2015 09:49:31 +0000 (09:49 +0000)]
FIX: directory HTree node checksum is not assigned correctly.

8 years agoFIX: directory HTree root checksum is not assigned correctly.
ngkaho1234 [Tue, 27 Oct 2015 09:28:00 +0000 (09:28 +0000)]
FIX: directory HTree root checksum is not assigned correctly.

8 years agoRefactor the workflow of ext4_link to prepare for METADATA_CSUM.
ngkaho1234 [Tue, 27 Oct 2015 09:02:12 +0000 (09:02 +0000)]
Refactor the workflow of ext4_link to prepare for METADATA_CSUM.

8 years agoFIX: directory leaf checksum is not assigned correctly.
ngkaho1234 [Tue, 27 Oct 2015 07:53:42 +0000 (07:53 +0000)]
FIX: directory leaf checksum is not assigned correctly.

8 years agoFIX: Inode & block bitmap checksums is not assigned correctly.
ngkaho1234 [Tue, 27 Oct 2015 07:53:19 +0000 (07:53 +0000)]
FIX: Inode & block bitmap checksums is not assigned correctly.

8 years agoFIX: extra_isize field is 0
ngkaho1234 [Tue, 27 Oct 2015 03:45:50 +0000 (03:45 +0000)]
FIX: extra_isize field is 0

8 years agoAssign correct checksum to directory entry blocks.
ngkaho1234 [Mon, 26 Oct 2015 12:31:35 +0000 (12:31 +0000)]
Assign correct checksum to directory entry blocks.

8 years agoFIX: directory checksum entry not initialized.
ngkaho1234 [Mon, 26 Oct 2015 10:30:03 +0000 (10:30 +0000)]
FIX: directory checksum entry not initialized.

8 years agoNow we should support the metadata_csum flag
ngkaho1234 [Sun, 25 Oct 2015 17:42:28 +0000 (01:42 +0800)]
Now we should support the metadata_csum flag

8 years agoFIX: Checking an unrelated flag.
ngkaho1234 [Sun, 25 Oct 2015 16:50:45 +0000 (00:50 +0800)]
FIX: Checking an unrelated flag.

8 years agoMETADATA_CSUM: Linear and HTree dir added.
ngkaho1234 [Sun, 25 Oct 2015 15:25:34 +0000 (23:25 +0800)]
METADATA_CSUM: Linear and HTree dir added.

8 years agoFIX: ext4_extent_full.c and ext4_extent.c lack endian conversion when doing checksum.
ngkaho1234 [Sun, 25 Oct 2015 13:39:03 +0000 (21:39 +0800)]
FIX: ext4_extent_full.c and ext4_extent.c lack endian conversion when doing checksum.

8 years agoFIX: referencing an invalid ext4_block in case of hash collision
ngkaho1234 [Sun, 25 Oct 2015 11:55:07 +0000 (19:55 +0800)]
FIX: referencing an invalid ext4_block in case of hash collision

8 years agoMETADATA_CSUM: inode added.
ngkaho1234 [Sat, 24 Oct 2015 13:08:49 +0000 (21:08 +0800)]
METADATA_CSUM: inode added.

8 years agoFIX: duplicated declaration.
ngkaho1234 [Sat, 24 Oct 2015 13:05:06 +0000 (21:05 +0800)]
FIX: duplicated declaration.

8 years agoMETADATA_CSUM: Extended Attribute added.
ngkaho1234 [Sat, 24 Oct 2015 12:33:39 +0000 (20:33 +0800)]
METADATA_CSUM: Extended Attribute added.

8 years agoext4_extent_full.c: very minor code optimisations on checksum handling
ngkaho1234 [Sat, 24 Oct 2015 08:37:33 +0000 (08:37 +0000)]
ext4_extent_full.c: very minor code optimisations on checksum handling

8 years agoext4_ialloc.c and ext4_balloc.c: very minor code optimizations.
ngkaho1234 [Fri, 23 Oct 2015 18:04:21 +0000 (18:04 +0000)]
ext4_ialloc.c and ext4_balloc.c: very minor code optimizations.

8 years agoMETADATA_CSUM: ext4_extent_full: do not do checksum on extent root.
ngkaho1234 [Fri, 23 Oct 2015 17:38:38 +0000 (17:38 +0000)]
METADATA_CSUM: ext4_extent_full: do not do checksum on extent root.

8 years agoMETADATA_CSUM: ext4_extent.c added.
ngkaho1234 [Fri, 23 Oct 2015 16:30:06 +0000 (16:30 +0000)]
METADATA_CSUM: ext4_extent.c added.

8 years agoMETADATA_CSUM: ext4_extent_full.c: do checksum on all extent tree blocks.
ngkaho1234 [Fri, 23 Oct 2015 16:09:09 +0000 (00:09 +0800)]
METADATA_CSUM: ext4_extent_full.c: do checksum on all extent tree blocks.

8 years agoMETADATA_CSUM: ext4_extent_full added.
ngkaho1234 [Fri, 23 Oct 2015 14:50:01 +0000 (22:50 +0800)]
METADATA_CSUM: ext4_extent_full added.

8 years agoMETADATA_CSUM: Add some notes to ext4_ialloc.c and ext4_balloc.c
ngkaho1234 [Fri, 23 Oct 2015 14:29:26 +0000 (22:29 +0800)]
METADATA_CSUM: Add some notes to ext4_ialloc.c and ext4_balloc.c

/*
 * BIG FAT NOTES:
 *       Currently we do not verify the checksum of bitmaps.
 */

8 years agoMETADATA_CSUM: block & inode bitmap checksum added.
ngkaho1234 [Fri, 23 Oct 2015 14:25:06 +0000 (22:25 +0800)]
METADATA_CSUM: block & inode bitmap checksum added.

8 years agoRefining the use of cast.
ngkaho1234 [Fri, 23 Oct 2015 14:24:01 +0000 (22:24 +0800)]
Refining the use of cast.

8 years agoMETADATA_CSUM: block group descriptor checksum added.
ngkaho1234 [Fri, 23 Oct 2015 13:48:51 +0000 (21:48 +0800)]
METADATA_CSUM: block group descriptor checksum added.

8 years agoMETADATA_CSUM: superblock checksum added.
ngkaho1234 [Fri, 23 Oct 2015 04:21:04 +0000 (04:21 +0000)]
METADATA_CSUM: superblock checksum added.

8 years agoMove ext4_fs_release_inode_block to module internals
gkostka [Tue, 20 Oct 2015 19:21:45 +0000 (21:21 +0200)]
Move ext4_fs_release_inode_block to module internals

8 years agoMove ext4_fs_set_inode_data_block_index to module internals
gkostka [Tue, 20 Oct 2015 19:13:07 +0000 (21:13 +0200)]
Move ext4_fs_set_inode_data_block_index to module internals

8 years agoRemove redundant code
gkostka [Tue, 20 Oct 2015 18:23:57 +0000 (20:23 +0200)]
Remove redundant code

8 years agoRemove stale static int ext4_ext_split_extent_at definition.
ngkaho1234 [Tue, 20 Oct 2015 16:55:46 +0000 (00:55 +0800)]
Remove stale static int ext4_ext_split_extent_at definition.

8 years agoTODO: More complicated truncate operation.
ngkaho1234 [Tue, 20 Oct 2015 15:51:20 +0000 (23:51 +0800)]
TODO: More complicated truncate operation.

8 years agoFIX: crash occurs when truncating a spare file.
ngkaho1234 [Tue, 20 Oct 2015 09:58:52 +0000 (09:58 +0000)]
FIX: crash occurs when truncating a spare file.

8 years agoMove allocation fail output condition to the end of the write loop
gkostka [Mon, 19 Oct 2015 19:59:58 +0000 (21:59 +0200)]
Move allocation fail output condition to the end of the write loop

8 years agoFix fwrite function
gkostka [Mon, 19 Oct 2015 18:52:12 +0000 (20:52 +0200)]
Fix fwrite function

If block allocation fail some data could be flushed
to file (when alocated blocks was ordered). Node size should
be updated after ext4_fs_append_inode_block fails.

8 years agoDo not set AGGRESSIVE_TEST on.
ngkaho1234 [Tue, 20 Oct 2015 04:22:04 +0000 (04:22 +0000)]
Do not set AGGRESSIVE_TEST on.

8 years agoNumorous patches on extents.c :
ngkaho1234 [Tue, 20 Oct 2015 04:20:17 +0000 (04:20 +0000)]
Numorous patches on extents.c :
1. Rewrite the code logic of ext4_ext_remove_space
2. FIX: failing to modify a multi-level b+tree

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
# modified:   extents.c
#

8 years agoAdd support_unwritten parameter to ext4_fs_get_inode_data_block_index.
ngkaho1234 [Mon, 19 Oct 2015 13:59:20 +0000 (13:59 +0000)]
Add support_unwritten parameter to ext4_fs_get_inode_data_block_index.

8 years agoFIX: ext4_extent_remove_space deallocating the wrong block.
ngkaho1234 [Mon, 19 Oct 2015 13:38:15 +0000 (13:38 +0000)]
FIX: ext4_extent_remove_space deallocating the wrong block.

8 years agoSimplify the code logic of ext4_fread & ext4_fwrite.
ngkaho1234 [Mon, 19 Oct 2015 13:35:05 +0000 (13:35 +0000)]
Simplify the code logic of ext4_fread & ext4_fwrite.

8 years agoMove stm32f429 demo to separate repository
gkostka [Sun, 18 Oct 2015 21:02:20 +0000 (23:02 +0200)]
Move stm32f429 demo to separate repository

8 years agoImprove generic & stm32f4 demos
gkostka [Sun, 18 Oct 2015 20:26:56 +0000 (22:26 +0200)]
Improve generic & stm32f4 demos

1. test_lwext4_file_test parameter list change
2. Update generic demo help & readme (short & long parameters)
3. Update readme.mediawiki

8 years agodos2unix conversion of Makefile
gkostka [Sun, 18 Oct 2015 20:10:48 +0000 (22:10 +0200)]
dos2unix conversion of Makefile

8 years agoSome minor cosmetic fixes
gkostka [Sun, 18 Oct 2015 20:02:54 +0000 (22:02 +0200)]
Some minor cosmetic fixes

1. Move EXT_MAX_BLOCKS to ext4_types.h
2. Use EXT_MAX_BLOCKS instead of (ext4_lblk_t) (-1)
3. Change return value of ext4_ext_more_to_rm to bool
4. Move assignment ex = path[depth].extent outside if statement

8 years agoFIX: ext4_fwrite cannot write to files correctly with filesize > 4.1G
ngkaho1234 [Sun, 18 Oct 2015 16:23:03 +0000 (00:23 +0800)]
FIX: ext4_fwrite cannot write to files correctly with filesize > 4.1G

8 years agoRemove EXT_INODE_HDR_NEED_GROW.
ngkaho1234 [Sun, 18 Oct 2015 13:24:46 +0000 (21:24 +0800)]
Remove EXT_INODE_HDR_NEED_GROW.
Instead, replace it with "bool *need_grow" parameter.

8 years agoRemove define used only in one expresion
gkostka [Sun, 18 Oct 2015 12:16:57 +0000 (14:16 +0200)]
Remove define used only in one expresion

8 years agoImprove casting in extent module
gkostka [Sun, 18 Oct 2015 12:16:00 +0000 (14:16 +0200)]
Improve casting in extent module

8 years agoFix indentation level
gkostka [Sun, 18 Oct 2015 12:12:39 +0000 (14:12 +0200)]
Fix indentation level

8 years agoext4_ext_zero_unwritten_range: uint32_t -> ext4_fsblk_t
ngkaho1234 [Sun, 18 Oct 2015 09:21:29 +0000 (09:21 +0000)]
ext4_ext_zero_unwritten_range: uint32_t -> ext4_fsblk_t

8 years agoFix compiler warning in extent module
gkostka [Sun, 18 Oct 2015 07:20:04 +0000 (09:20 +0200)]
Fix compiler warning in extent module

8 years agoMultiple fixes related to basic block type
ngkaho1234 [Sun, 18 Oct 2015 06:17:17 +0000 (06:17 +0000)]
Multiple fixes related to basic block type

1. uint32_t block address converted to ext4_fsblk_t block address
2. ext4_balloc_find_goal renamed to ext4_fs_indirect_find_goal
3. ext4_balloc_alloc_block now needs one more parameter(goal)

8 years agoExtent full & simple API unification
gkostka [Fri, 16 Oct 2015 16:50:48 +0000 (18:50 +0200)]
Extent full & simple API unification

8 years agoMove helper functions from .c to .h.
gkostka [Fri, 16 Oct 2015 15:49:42 +0000 (17:49 +0200)]
Move helper functions from .c to .h.

Halper functions could be used in both extent implementations

8 years agoIntroduce ext4_fs_init_inode_data_block_index
gkostka [Fri, 16 Oct 2015 14:43:07 +0000 (16:43 +0200)]
Introduce ext4_fs_init_inode_data_block_index

8 years agoAdd CONFIG_EXTENT_FULL compilation flag
gkostka [Fri, 16 Oct 2015 14:40:40 +0000 (16:40 +0200)]
Add CONFIG_EXTENT_FULL compilation flag

This switch decides which extent implementation will
be chosen to compile.

8 years agoAdd PRId64 & PRIu64 macros when not defined int inttypes.h
gkostka [Fri, 16 Oct 2015 14:30:49 +0000 (16:30 +0200)]
Add PRId64 & PRIu64 macros when not defined int inttypes.h

8 years agoMove __unused macro from tree.h to ext4_config.h
gkostka [Fri, 16 Oct 2015 14:29:40 +0000 (16:29 +0200)]
Move __unused macro from tree.h to ext4_config.h

8 years agoIntroduce EXT4_BLOCK_ZERO macro to initialize ext4_block
gkostka [Fri, 16 Oct 2015 14:27:33 +0000 (16:27 +0200)]
Introduce EXT4_BLOCK_ZERO macro to initialize ext4_block

8 years agoIntroduce full extent implementation (by KaHo Ng)
gkostka [Fri, 16 Oct 2015 14:03:26 +0000 (16:03 +0200)]
Introduce full extent implementation (by KaHo Ng)

Old implementation doesn't handle unwritten extents properly.
This implementation is more heavy but access to unwritten extents
is safe. For microcontrollers users old implementation is ok since
partition isn't shared with system which writes unwritten extents
by falocate/ftruncate.

8 years ago1. Use cc/c++ instead of gcc/g++
ngkaho1234 [Sun, 11 Oct 2015 16:07:28 +0000 (00:07 +0800)]
1. Use cc/c++ instead of gcc/g++
2. Detect ENODATA definition.

8 years agoImprove debug formatting
gkostka [Sun, 11 Oct 2015 14:32:25 +0000 (16:32 +0200)]
Improve debug formatting

8 years agoIntroduce bdev_write_sb to mkfs module
gkostka [Sun, 11 Oct 2015 14:06:49 +0000 (16:06 +0200)]
Introduce bdev_write_sb to mkfs module

8 years agoAdd superblock fill function
gkostka [Sun, 11 Oct 2015 13:02:22 +0000 (15:02 +0200)]
Add superblock fill function

8 years agoPort create_fs_aux_info form ext4-utils
gkostka [Sun, 11 Oct 2015 12:11:48 +0000 (14:11 +0200)]
Port create_fs_aux_info form ext4-utils

8 years agoMake ext4_sb_sparse public
gkostka [Sun, 11 Oct 2015 12:11:20 +0000 (14:11 +0200)]
Make ext4_sb_sparse public

8 years agoAdd journal data to mkfs info
gkostka [Sun, 11 Oct 2015 11:39:14 +0000 (13:39 +0200)]
Add journal data to mkfs info

8 years agoAdd mkfs to debug module
gkostka [Sun, 11 Oct 2015 10:17:25 +0000 (12:17 +0200)]
Add mkfs to debug module