lwext4.git
8 years agoext4: some style fixes & doxygen comments
gkostka [Fri, 18 Dec 2015 13:44:59 +0000 (14:44 +0100)]
ext4: some style fixes & doxygen comments

8 years agoext4_xattr: little style fix
gkostka [Fri, 18 Dec 2015 13:44:05 +0000 (14:44 +0100)]
ext4_xattr: little style fix

8 years agoext4_journal: add jbd_journal_commit_trans routine.
ngkaho1234 [Fri, 18 Dec 2015 03:35:59 +0000 (03:35 +0000)]
ext4_journal: add jbd_journal_commit_trans routine.

8 years agoext4_journal: mark buffers invalid if transaction is aborted.
ngkaho1234 [Thu, 17 Dec 2015 15:19:30 +0000 (23:19 +0800)]
ext4_journal: mark buffers invalid if transaction is aborted.

8 years agoext4_journal: add comments to the code part 2.
ngkaho1234 [Thu, 17 Dec 2015 15:17:02 +0000 (23:17 +0800)]
ext4_journal: add comments to the code part 2.

8 years agoext4_journal: add comments to the code part 1.
ngkaho1234 [Thu, 17 Dec 2015 14:26:13 +0000 (22:26 +0800)]
ext4_journal: add comments to the code part 1.

8 years agoext4: enable write-back mode when undergoing journal test.
ngkaho1234 [Thu, 17 Dec 2015 13:21:23 +0000 (21:21 +0800)]
ext4: enable write-back mode when undergoing journal test.

8 years agoext4: stop journalling when journalling test is finished.
ngkaho1234 [Thu, 17 Dec 2015 13:20:40 +0000 (21:20 +0800)]
ext4: stop journalling when journalling test is finished.

8 years agoext4_journal: forcibly flush data to disk when stop journalling.
ngkaho1234 [Thu, 17 Dec 2015 13:16:13 +0000 (21:16 +0800)]
ext4_journal: forcibly flush data to disk when stop journalling.

8 years agoext4_journal: wrap around journal->start if it overflows.
ngkaho1234 [Thu, 17 Dec 2015 09:44:06 +0000 (09:44 +0000)]
ext4_journal: wrap around journal->start if it overflows.

8 years agoext4_journal: add jbd_journal_commit_all routine.
ngkaho1234 [Thu, 17 Dec 2015 09:07:11 +0000 (09:07 +0000)]
ext4_journal: add jbd_journal_commit_all routine.

8 years agoext4_journal: flush all data to disk when journal is full.
ngkaho1234 [Thu, 17 Dec 2015 09:04:15 +0000 (09:04 +0000)]
ext4_journal: flush all data to disk when journal is full.

8 years agoext4_journal: IO operations on journal inode are written-through.
ngkaho1234 [Wed, 16 Dec 2015 11:00:25 +0000 (11:00 +0000)]
ext4_journal: IO operations on journal inode are written-through.

8 years agoext4_bcache: do not flush data in an invalid buffer.
ngkaho1234 [Wed, 16 Dec 2015 10:49:38 +0000 (10:49 +0000)]
ext4_bcache: do not flush data in an invalid buffer.

8 years agoext4_bcache: add new flag BC_FLUSH.
ngkaho1234 [Wed, 16 Dec 2015 10:45:24 +0000 (10:45 +0000)]
ext4_bcache: add new flag BC_FLUSH.

8 years agoext4_blockdev: add ext4_block_cache_flush routine.
ngkaho1234 [Tue, 15 Dec 2015 23:31:29 +0000 (23:31 +0000)]
ext4_blockdev: add ext4_block_cache_flush routine.

8 years agoext4_journal: one bugfix plus one code logic changes below.
ngkaho1234 [Tue, 15 Dec 2015 13:59:52 +0000 (13:59 +0000)]
ext4_journal: one bugfix plus one code logic changes below.

  - fix referencing jbd_buf->block that may be freed.
  - allow having multiple transaction checkpoints.

8 years agoext4_journal: handle EXT4_FINCOM_RECOVER flag properly.
ngkaho1234 [Mon, 14 Dec 2015 23:26:32 +0000 (23:26 +0000)]
ext4_journal: handle EXT4_FINCOM_RECOVER flag properly.

8 years agoext4_journal: employ better ways to handle revoke blocks during checkpoint.
ngkaho1234 [Mon, 14 Dec 2015 16:42:53 +0000 (16:42 +0000)]
ext4_journal: employ better ways to handle revoke blocks during checkpoint.

8 years agoext4_journal: fix wrong endianess of revoke header's count field.
ngkaho1234 [Mon, 14 Dec 2015 16:17:15 +0000 (16:17 +0000)]
ext4_journal: fix wrong endianess of revoke header's count field.

8 years agoext4_journal: some changes below.
ngkaho1234 [Mon, 14 Dec 2015 16:10:58 +0000 (16:10 +0000)]
ext4_journal: some changes below.

  - check whether buffer going to be added is dirty.
  - skip checkpoint on transactions having no data block.

8 years agoext4: add tests on revoke table of journal to ext4_test_journal.
ngkaho1234 [Mon, 14 Dec 2015 15:51:05 +0000 (15:51 +0000)]
ext4: add tests on revoke table of journal to ext4_test_journal.

8 years agoext4_journal: fixes on numorous bugs, see below.
ngkaho1234 [Mon, 14 Dec 2015 14:39:41 +0000 (14:39 +0000)]
ext4_journal: fixes on numorous bugs, see below.

  - UUID not being copied to tail of a block tag when needed.
  - checkpoint queue not initialized.
  - ext4_block_set on non-existing journal bdev.
  - journal superblock not flushed to disk immediately.

8 years agoext4: more codes on journal testing.
ngkaho1234 [Mon, 14 Dec 2015 14:35:18 +0000 (14:35 +0000)]
ext4: more codes on journal testing.

8 years agoext4_journal: Fix s_first field being touched accidentally.
ngkaho1234 [Mon, 14 Dec 2015 09:20:30 +0000 (09:20 +0000)]
ext4_journal: Fix s_first field being touched accidentally.

8 years agoext4_journal: clear EXT4_FINCOM_RECOVER after replaying journal.
ngkaho1234 [Sun, 13 Dec 2015 12:31:14 +0000 (12:31 +0000)]
ext4_journal: clear EXT4_FINCOM_RECOVER after replaying journal.

8 years agoext4: journal test code skeleton.
ngkaho1234 [Sat, 12 Dec 2015 15:12:05 +0000 (23:12 +0800)]
ext4: journal test code skeleton.

8 years agoext4_journal: add function prototypes to ext4_journal.h
ngkaho1234 [Sat, 12 Dec 2015 13:25:04 +0000 (21:25 +0800)]
ext4_journal: add function prototypes to ext4_journal.h

8 years agoext4_journal: journal write part 2.
ngkaho1234 [Fri, 11 Dec 2015 09:17:54 +0000 (09:17 +0000)]
ext4_journal: journal write part 2.

8 years agoext4_journal: introduce checkpoint mechanism.
ngkaho1234 [Thu, 10 Dec 2015 15:53:03 +0000 (15:53 +0000)]
ext4_journal: introduce checkpoint mechanism.

8 years agoext4_journal: journal write v1.
ngkaho1234 [Thu, 10 Dec 2015 13:02:57 +0000 (13:02 +0000)]
ext4_journal: journal write v1.

8 years agoext4_journal: journal write skeleton code part 2.
ngkaho1234 [Tue, 8 Dec 2015 15:58:33 +0000 (15:58 +0000)]
ext4_journal: journal write skeleton code part 2.

8 years agoext4_journal: journal write skeleton code.
ngkaho1234 [Tue, 8 Dec 2015 14:45:37 +0000 (14:45 +0000)]
ext4_journal: journal write skeleton code.

8 years agoAdd one second sleep between server execute and tests
gkostka [Thu, 10 Dec 2015 11:47:28 +0000 (12:47 +0100)]
Add one second sleep between server execute and tests

8 years agoAdd install target & new fs_tools names & readme update
gkostka [Wed, 9 Dec 2015 20:59:40 +0000 (21:59 +0100)]
Add install target & new fs_tools names & readme update

8 years agoConvert to linux line endings in multiple files
gkostka [Wed, 9 Dec 2015 20:23:31 +0000 (21:23 +0100)]
Convert to linux line endings in multiple files

8 years agoAdd logo to README.md
gkostka [Wed, 9 Dec 2015 20:13:00 +0000 (21:13 +0100)]
Add logo to README.md

8 years agofs_test: update test suite
gkostka [Wed, 9 Dec 2015 19:16:47 +0000 (20:16 +0100)]
fs_test: update test suite

Automatic tests tor two image set
 - make test - tests for unpacked images from ext_images.7z
 - make test_all - test for generated 1GB images + fsck

8 years agoext4_mbr: bootstrap code printf in ext4_mbr_scan function
gkostka [Wed, 9 Dec 2015 12:15:33 +0000 (13:15 +0100)]
ext4_mbr: bootstrap code printf in ext4_mbr_scan function

8 years agoext4_debug: add DEBUG_NOPREFIX flag for debug printf
gkostka [Wed, 9 Dec 2015 12:14:27 +0000 (13:14 +0100)]
ext4_debug: add DEBUG_NOPREFIX flag for debug printf

8 years agoext4_blockdev: move bread/bwrite counters to ext4_blockdev_iface
gkostka [Wed, 9 Dec 2015 11:44:25 +0000 (12:44 +0100)]
ext4_blockdev: move bread/bwrite counters to ext4_blockdev_iface

8 years agoext4_mbr: improve printf formatting
gkostka [Tue, 8 Dec 2015 19:32:15 +0000 (20:32 +0100)]
ext4_mbr: improve printf formatting

8 years agoext4_mbr: multiple changes related to MBR parsing
gkostka [Tue, 8 Dec 2015 19:06:41 +0000 (20:06 +0100)]
ext4_mbr: multiple changes related to MBR parsing

1. Introduce part_offset & part_size fields in blockdev
2. Blockdev operations with part_offset
3. Blockdev operations check based on part_size
4. lwext4_mbr tool: scan master boot record for linux partitions
5. Set right partition sizes in linux/windows file blockdevs

8 years agoext4_debug: add mbr debug definitions
gkostka [Tue, 8 Dec 2015 18:57:45 +0000 (19:57 +0100)]
ext4_debug: add mbr debug definitions

8 years agoAdd lock/unlock functions to blockdev_iface
gkostka [Tue, 8 Dec 2015 16:47:43 +0000 (17:47 +0100)]
Add lock/unlock functions to blockdev_iface

Since one blockdev_iface could be shared by multi block devices
lock/unlock functions is needed. Locks are not needed in single
partition mode.

8 years agoChange ph_flags to ph_refctr in block device interface
gkostka [Tue, 8 Dec 2015 15:43:19 +0000 (16:43 +0100)]
Change ph_flags to ph_refctr in block device interface

8 years agoext4_mbr: initial MBR parser code
gkostka [Tue, 8 Dec 2015 15:06:45 +0000 (16:06 +0100)]
ext4_mbr: initial MBR parser code

8 years agoAdd ph_blk_offset during every blockdev bread/bwrite
gkostka [Mon, 7 Dec 2015 20:52:22 +0000 (21:52 +0100)]
Add ph_blk_offset during every blockdev bread/bwrite

8 years agoIndroduce split ext4_blockdev to two separate structures
gkostka [Mon, 7 Dec 2015 19:54:24 +0000 (20:54 +0100)]
Indroduce split ext4_blockdev to two separate structures

Preparation for multi partition mode. New ext4_blockdev_iface
will allow to share same interface by multiple block devices.

8 years agoUpdate .gitignore
gkostka [Mon, 7 Dec 2015 17:56:21 +0000 (18:56 +0100)]
Update .gitignore

8 years agoStyle fixes in multiple modules
gkostka [Mon, 7 Dec 2015 17:54:08 +0000 (18:54 +0100)]
Style fixes in multiple modules

8 years agoext4_bcache: manipulate buffer refctr by two helpers
ngkaho1234 [Sun, 6 Dec 2015 03:33:09 +0000 (11:33 +0800)]
ext4_bcache: manipulate buffer refctr by two helpers

  - ext4_bcache_inc_ref
  - ext4_bcache_dec_ref

8 years agoDeprecate uptodate and dirty fields in ext4_block.
ngkaho1234 [Fri, 4 Dec 2015 17:34:33 +0000 (17:34 +0000)]
Deprecate uptodate and dirty fields in ext4_block.

8 years agoext4_journal: add transaction in-memory structure.
ngkaho1234 [Fri, 4 Dec 2015 12:59:57 +0000 (12:59 +0000)]
ext4_journal: add transaction in-memory structure.

8 years agoext4_blockdev: a number of changes below
ngkaho1234 [Fri, 4 Dec 2015 12:56:38 +0000 (12:56 +0000)]
ext4_blockdev: a number of changes below

  - call buf->end_write() during ext4_block_flush_buf.
  - For ext4_block_get, call ext4_blocks_get_direct instead
    of directly calling bdev->bread().

8 years agoext4_fs: reactor some long function names
gkostka [Thu, 3 Dec 2015 20:30:39 +0000 (21:30 +0100)]
ext4_fs: reactor some long function names

New, more useful names:
 - ext4_fs_init_inode_dblk_idx
 - ext4_fs_get_inode_dblk_idx
 - ext4_fs_append_inode_dblk

8 years agoext4: indentation & style fixes
gkostka [Thu, 3 Dec 2015 20:12:34 +0000 (21:12 +0100)]
ext4: indentation & style fixes

8 years agoext4_balloc: indentation, style and comment fixes
gkostka [Thu, 3 Dec 2015 19:54:32 +0000 (20:54 +0100)]
ext4_balloc: indentation, style and comment fixes

8 years agoAdd lock/unlock mountpoint to ext4_recover
gkostka [Thu, 3 Dec 2015 07:39:18 +0000 (08:39 +0100)]
Add lock/unlock mountpoint to ext4_recover

8 years agoSet std=gnu11 as default
gkostka [Wed, 2 Dec 2015 12:13:41 +0000 (13:13 +0100)]
Set std=gnu11 as default

8 years agoChange preprocessor macros to inline functions
gkostka [Wed, 2 Dec 2015 12:12:52 +0000 (13:12 +0100)]
Change preprocessor macros to inline functions

8 years agoext4_bcache & ext4_blockdev: unify buffer flushing code.
ngkaho1234 [Wed, 2 Dec 2015 11:36:23 +0000 (19:36 +0800)]
ext4_bcache & ext4_blockdev: unify buffer flushing code.

8 years agoReadme update
gkostka [Wed, 2 Dec 2015 07:54:27 +0000 (08:54 +0100)]
Readme update

8 years agoext4_journal: do simple verification on jbd superblock.
ngkaho1234 [Tue, 1 Dec 2015 16:31:24 +0000 (16:31 +0000)]
ext4_journal: do simple verification on jbd superblock.

8 years agoext4: introduce ext4_recover function
gkostka [Mon, 30 Nov 2015 08:38:20 +0000 (09:38 +0100)]
ext4: introduce ext4_recover function

8 years agoext4_journal: fix wrong parsing of revoke block.
ngkaho1234 [Sun, 29 Nov 2015 15:43:54 +0000 (15:43 +0000)]
ext4_journal: fix wrong parsing of revoke block.

8 years agoAdd license header to ext4_journal
gkostka [Sun, 29 Nov 2015 10:03:37 +0000 (11:03 +0100)]
Add license header to ext4_journal

8 years agoFix avrxmega7 build
gkostka [Sun, 29 Nov 2015 10:00:46 +0000 (11:00 +0100)]
Fix avrxmega7 build

8 years agoFix compile warnings
gkostka [Sun, 29 Nov 2015 09:58:52 +0000 (10:58 +0100)]
Fix compile warnings

8 years agoext4_journal: try to detect if any blocks are revoked in a transaction.
ngkaho1234 [Sun, 29 Nov 2015 02:57:05 +0000 (02:57 +0000)]
ext4_journal: try to detect if any blocks are revoked in a transaction.

8 years agoext4_journal: simplify the code logic of superblock replaying.
ngkaho1234 [Sun, 29 Nov 2015 02:44:49 +0000 (02:44 +0000)]
ext4_journal: simplify the code logic of superblock replaying.

8 years agoext4_journal: simple handling on superblock.
ngkaho1234 [Sat, 28 Nov 2015 20:38:33 +0000 (20:38 +0000)]
ext4_journal: simple handling on superblock.

8 years agoext4_journal: initial journal replay support part 2.
ngkaho1234 [Sat, 28 Nov 2015 20:27:54 +0000 (20:27 +0000)]
ext4_journal: initial journal replay support part 2.

8 years agoext4_journal: initial journal replay support.
ngkaho1234 [Sat, 28 Nov 2015 20:09:27 +0000 (04:09 +0800)]
ext4_journal: initial journal replay support.

8 years agoext4_journal: fix wrong parsing of revoke blocks list.
ngkaho1234 [Sat, 28 Nov 2015 19:30:26 +0000 (03:30 +0800)]
ext4_journal: fix wrong parsing of revoke blocks list.

8 years agoext4_journal: add building revoke tree.
ngkaho1234 [Sat, 28 Nov 2015 18:13:18 +0000 (18:13 +0000)]
ext4_journal: add building revoke tree.

8 years agoext4_journal: fix block_tag flag being wrongly parsed...
ngkaho1234 [Sat, 28 Nov 2015 16:39:32 +0000 (16:39 +0000)]
ext4_journal: fix block_tag flag being wrongly parsed...

8 years agoext4_journal: initial support of processing block_tags array.
ngkaho1234 [Sat, 28 Nov 2015 14:51:21 +0000 (14:51 +0000)]
ext4_journal: initial support of processing block_tags array.

8 years agoext4_journal: fix ext4_block not being freed.
ngkaho1234 [Thu, 26 Nov 2015 11:09:28 +0000 (11:09 +0000)]
ext4_journal: fix ext4_block not being freed.

8 years agoext4_journal.c: journal replay skeletal code.
ngkaho1234 [Thu, 26 Nov 2015 11:01:13 +0000 (11:01 +0000)]
ext4_journal.c: journal replay skeletal code.

8 years agoext4_bcache: clear BC_DIRTY flag when buffer will be dropped.
ngkaho1234 [Tue, 24 Nov 2015 15:09:23 +0000 (15:09 +0000)]
ext4_bcache: clear BC_DIRTY flag when buffer will be dropped.

8 years agoChange duplicated functions (to_le*/to_be*) to reorder*
gkostka [Tue, 24 Nov 2015 06:33:19 +0000 (07:33 +0100)]
Change duplicated functions (to_le*/to_be*) to reorder*

to_le*/to_be* now are macros with suitable endianes expansion

8 years agoFix lru/lba compare functions: possible overflow
gkostka [Mon, 23 Nov 2015 17:12:26 +0000 (18:12 +0100)]
Fix lru/lba compare functions: possible overflow

Functions will not work for lba values:
 - 0x100000001ULL - 0x000000001UL

It won't work also for 16 int architectures. So it is better to
implement this functions using if/else if statements.

8 years agoext4_bcache: remove free_delay member from ext4_bcache.
ngkaho1234 [Mon, 23 Nov 2015 15:07:01 +0000 (15:07 +0000)]
ext4_bcache: remove free_delay member from ext4_bcache.

8 years agoext4_bcache: add comments to the changes.
ngkaho1234 [Mon, 23 Nov 2015 14:28:09 +0000 (14:28 +0000)]
ext4_bcache: add comments to the changes.

8 years agoext4_bcache: fix return value of ext4_buf_lowest_lru (lba -> lru)
ngkaho1234 [Mon, 23 Nov 2015 13:39:29 +0000 (13:39 +0000)]
ext4_bcache: fix return value of ext4_buf_lowest_lru (lba -> lru)

8 years agoext4_bcache & ext4_blockdev: Buffer cache rework.
ngkaho1234 [Mon, 23 Nov 2015 13:26:56 +0000 (13:26 +0000)]
ext4_bcache & ext4_blockdev: Buffer cache rework.

8 years agoext4_journal: add journal helpers to ext4_journal.h
ngkaho1234 [Sat, 21 Nov 2015 05:31:57 +0000 (05:31 +0000)]
ext4_journal: add journal helpers to ext4_journal.h

8 years agoext4_journal: try to read jbd superblock when loading jbd.
ngkaho1234 [Fri, 20 Nov 2015 16:01:06 +0000 (16:01 +0000)]
ext4_journal: try to read jbd superblock when loading jbd.

8 years agoext4_journal: two changes below
ngkaho1234 [Sun, 15 Nov 2015 09:25:38 +0000 (17:25 +0800)]
ext4_journal: two changes below

 - Add JBD_SUPERBLOCK_SIZE macro
 - Add jbd_sb_read & jbd_sb_write

8 years agoext4_journal: add block_get(_noread)/block_set.
ngkaho1234 [Sat, 14 Nov 2015 14:46:30 +0000 (22:46 +0800)]
ext4_journal: add block_get(_noread)/block_set.

8 years agoJournalling(JBD) support skeletal code.
ngkaho1234 [Fri, 13 Nov 2015 15:38:37 +0000 (23:38 +0800)]
Journalling(JBD) support skeletal code.

8 years agoRefactor some problematic (too long) dir entry data structures
gkostka [Sat, 21 Nov 2015 17:59:15 +0000 (18:59 +0100)]
Refactor some problematic (too long) dir entry data structures

8 years agoStyle & indentation improvements in ext4 part 3
gkostka [Sat, 21 Nov 2015 17:32:54 +0000 (18:32 +0100)]
Style & indentation improvements in ext4 part 3

8 years agoStyle & indentation improvements in ext4 part 2
gkostka [Sat, 21 Nov 2015 16:52:55 +0000 (17:52 +0100)]
Style & indentation improvements in ext4 part 2

8 years agoRefactoring: directrory entry prefix: EXT4_DIRENTRY* -> EXT4_DE*
gkostka [Sat, 21 Nov 2015 16:21:11 +0000 (17:21 +0100)]
Refactoring: directrory entry prefix: EXT4_DIRENTRY* -> EXT4_DE*

8 years agoStyle & indentation improvements in ext4
gkostka [Sat, 21 Nov 2015 16:14:44 +0000 (17:14 +0100)]
Style & indentation improvements in ext4

8 years agoStyle/indentation fix in ext4_dir
gkostka [Sat, 21 Nov 2015 15:28:29 +0000 (16:28 +0100)]
Style/indentation fix in ext4_dir

8 years agoRename 'initialize_dir_tail' to 'ext4_dir_init_entry_tail'
gkostka [Thu, 19 Nov 2015 22:30:03 +0000 (23:30 +0100)]
Rename 'initialize_dir_tail' to 'ext4_dir_init_entry_tail'

8 years agoAdd #ifdef __cplusplus to all header files
gkostka [Thu, 19 Nov 2015 22:27:44 +0000 (23:27 +0100)]
Add #ifdef __cplusplus to all header files