lwext4.git
8 years agoReturn success when 0 block read/write is called
gkostka [Sun, 15 Nov 2015 21:57:32 +0000 (22:57 +0100)]
Return success when 0 block read/write is called

8 years agoext4_mkfs: use EXT4_SUPERBLOCK_SIZE instead of sizeof op.
ngkaho1234 [Sun, 15 Nov 2015 09:24:41 +0000 (17:24 +0800)]
ext4_mkfs: use EXT4_SUPERBLOCK_SIZE instead of sizeof op.

8 years agoext4_mkfs is able to create image with sblock and basic features
gkostka [Sat, 14 Nov 2015 11:18:44 +0000 (12:18 +0100)]
ext4_mkfs is able to create image with sblock and basic features

TBD:
 - block groups descriptors
 - ext3/ext4 feature handling
 - root and lost+found directories
 - journal inode

8 years agoRemove obsolete feature flag
gkostka [Sat, 14 Nov 2015 11:17:25 +0000 (12:17 +0100)]
Remove obsolete feature flag

8 years agodefine _LARGEFILE64_SOURCE to be able to access large files.
ngkaho1234 [Sat, 14 Nov 2015 10:52:15 +0000 (10:52 +0000)]
define _LARGEFILE64_SOURCE to be able to access large files.

8 years agoext4_mkfs: fix SIGSEGV caused by inaccurate memory allocation size.
ngkaho1234 [Sat, 14 Nov 2015 10:55:45 +0000 (10:55 +0000)]
ext4_mkfs: fix SIGSEGV caused by inaccurate memory allocation size.

8 years agoAdd lwext4_mkfs tool skeleton
gkostka [Fri, 13 Nov 2015 22:35:51 +0000 (23:35 +0100)]
Add lwext4_mkfs tool skeleton

8 years agoMove all test modules to fs_test directory
gkostka [Fri, 13 Nov 2015 21:14:03 +0000 (22:14 +0100)]
Move all test modules to fs_test directory

8 years agoAdd block device skeleton module
gkostka [Fri, 13 Nov 2015 21:10:59 +0000 (22:10 +0100)]
Add block device skeleton module

8 years agoRemove obsolete chibios block devices
gkostka [Fri, 13 Nov 2015 21:09:07 +0000 (22:09 +0100)]
Remove obsolete chibios block devices

8 years agoReplace ext4_block_get with ext4_block_get_noread:
ngkaho1234 [Tue, 10 Nov 2015 04:07:50 +0000 (04:07 +0000)]
Replace ext4_block_get with ext4_block_get_noread:

ext4_dir, ext4_dir_idx, ext4_extent, ext4_fs

8 years agoFIX: ext4_extent: checksumming against newly allocated block.
ngkaho1234 [Mon, 9 Nov 2015 08:49:45 +0000 (08:49 +0000)]
FIX: ext4_extent: checksumming against newly allocated block.

8 years agoAdd comments on the introduction of up-to-date flag
ngkaho1234 [Sun, 8 Nov 2015 10:18:23 +0000 (10:18 +0000)]
Add comments on the introduction of up-to-date flag

8 years agoUse ext4_block_get_noread when read operation is not required
ngkaho1234 [Sun, 8 Nov 2015 07:24:42 +0000 (07:24 +0000)]
Use ext4_block_get_noread when read operation is not required

8 years agoReworks on buffer management
ngkaho1234 [Sat, 7 Nov 2015 17:35:15 +0000 (17:35 +0000)]
Reworks on buffer management

1. ext4_bcache: use flags arrayinstead of dirty boolean array.
2. ext4_blockdev: ext4_block_get_noread added.

8 years agoFIX: item->in_inode is not initialized.
ngkaho1234 [Thu, 5 Nov 2015 13:10:16 +0000 (13:10 +0000)]
FIX: item->in_inode is not initialized.

8 years agoEA: trusted, security namespace added.
ngkaho1234 [Thu, 5 Nov 2015 10:14:29 +0000 (10:14 +0000)]
EA: trusted, security namespace added.
    "system.richacl" added.

8 years agoEA: ea entries with name "system.data" should be
ngkaho1234 [Thu, 5 Nov 2015 09:41:01 +0000 (09:41 +0000)]
EA: ea entries with name "system.data" should be
    preferentially stored in inode body.

8 years agoFix travis build
gkostka [Thu, 5 Nov 2015 07:27:38 +0000 (08:27 +0100)]
Fix travis build

8 years agoAdd arm-none-eabi-gcc toolchain to travis build
gkostka [Thu, 5 Nov 2015 07:12:58 +0000 (08:12 +0100)]
Add arm-none-eabi-gcc toolchain to travis build

8 years agoext4_fs_inode_checksum: fix checksum calculation
ngkaho1234 [Sun, 1 Nov 2015 14:11:35 +0000 (14:11 +0000)]
ext4_fs_inode_checksum: fix checksum calculation

If inode size is not large enough to hold 32bit checksum,
then return lower 16bit.

8 years agoext4_generic_open2: add EXT4_FINCOM_FILETYPE check
ngkaho1234 [Sun, 1 Nov 2015 14:09:16 +0000 (14:09 +0000)]
ext4_generic_open2: add EXT4_FINCOM_FILETYPE check

When following the path, we should check whether
EXT4_FINCOM_FILETYPE is enabled.

8 years agoUpdate README.md
gkostka [Sat, 31 Oct 2015 20:48:09 +0000 (21:48 +0100)]
Update README.md

8 years agoCode format in dir_idx module
gkostka [Thu, 29 Oct 2015 22:21:20 +0000 (23:21 +0100)]
Code format in dir_idx module

8 years agoRefactor directory related names (shorter)
gkostka [Thu, 29 Oct 2015 21:59:18 +0000 (22:59 +0100)]
Refactor directory related names (shorter)

8 years agoFix printf fotmating in lwext4_server
gkostka [Thu, 29 Oct 2015 20:23:51 +0000 (21:23 +0100)]
Fix printf fotmating in lwext4_server

8 years agoEnable debug symbols generation in generic build
gkostka [Thu, 29 Oct 2015 20:12:08 +0000 (21:12 +0100)]
Enable debug symbols generation in generic build

8 years agoUpdate README.md
gkostka [Thu, 29 Oct 2015 19:14:51 +0000 (20:14 +0100)]
Update README.md

8 years agoAdd travis build link
gkostka [Thu, 29 Oct 2015 19:01:09 +0000 (20:01 +0100)]
Add travis build link

8 years agoReorder includes to fix travis build
gkostka [Thu, 29 Oct 2015 18:52:23 +0000 (19:52 +0100)]
Reorder includes to fix travis build

8 years agoFix -Wformat-security warnings
gkostka [Thu, 29 Oct 2015 18:46:22 +0000 (19:46 +0100)]
Fix -Wformat-security warnings

8 years agoAdd travis.yml file
gkostka [Thu, 29 Oct 2015 18:24:24 +0000 (19:24 +0100)]
Add travis.yml file

8 years agoFix compile warnings for 16 bit int architectures
gkostka [Thu, 29 Oct 2015 17:52:34 +0000 (18:52 +0100)]
Fix compile warnings for 16 bit int architectures

8 years agoFix compile error when META_CSUM is disabled
gkostka [Thu, 29 Oct 2015 17:48:05 +0000 (18:48 +0100)]
Fix compile error when META_CSUM is disabled

8 years agoRefactor debug message format (CONFIG_DEBUG_PREFIX)
gkostka [Thu, 29 Oct 2015 17:32:29 +0000 (18:32 +0100)]
Refactor debug message format (CONFIG_DEBUG_PREFIX)

On some embedded devices debug printf length is limited to less
than 80 characters. It is good to have compile switch to control debug
prefix enable/disable.

8 years agoFIX: ext4_extent_full.c: should not assign checksum to extent root(in inode)
ngkaho1234 [Thu, 29 Oct 2015 11:25:25 +0000 (19:25 +0800)]
FIX: ext4_extent_full.c: should not assign checksum to extent root(in inode)

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.