lwext4.git
8 years agomakefile: add version definitions to makefile & CMakeLists
gkostka [Thu, 31 Dec 2015 00:33:28 +0000 (01:33 +0100)]
makefile: add version definitions to makefile & CMakeLists

8 years agolwext4_server: improve opt list
gkostka [Thu, 31 Dec 2015 00:12:20 +0000 (01:12 +0100)]
lwext4_server: improve opt list

8 years agolwext4_generic: add verbose mode to generic application
gkostka [Thu, 31 Dec 2015 00:11:23 +0000 (01:11 +0100)]
lwext4_generic: add verbose mode to generic application

8 years agofs_test: simplify open_filedev implementation
gkostka [Wed, 30 Dec 2015 23:38:12 +0000 (00:38 +0100)]
fs_test: simplify open_filedev implementation

8 years agotest_lwext4: add journaling to generic test module
gkostka [Wed, 30 Dec 2015 08:58:00 +0000 (09:58 +0100)]
test_lwext4: add journaling to generic test module

8 years agolwext4_server: add journaling to filesystem test suite
gkostka [Wed, 30 Dec 2015 08:43:27 +0000 (09:43 +0100)]
lwext4_server: add journaling to filesystem test suite

8 years agoext4_journal: refactor purging transactions code
ngkaho1234 [Wed, 30 Dec 2015 06:34:07 +0000 (06:34 +0000)]
ext4_journal: refactor purging transactions code

Make the code of purging transactions from cp_queue clearer.

8 years agoext4_journal: improve transaction handling
ngkaho1234 [Tue, 29 Dec 2015 17:45:46 +0000 (01:45 +0800)]
ext4_journal: improve transaction handling

Keep track on transactions not being the first entry on cp_queue.

8 years agoext4_journal: reimplement buffer list as buffer queue in jbd_trans.
ngkaho1234 [Tue, 29 Dec 2015 16:39:55 +0000 (00:39 +0800)]
ext4_journal: reimplement buffer list as buffer queue in jbd_trans.

With this modification, we can first remove non-dirty buffers from the
tail of of a buffer queue before iterating the entries on the buffer queue.

8 years agoext4_journal: fix trans->data_cnt not be decremented
ngkaho1234 [Tue, 29 Dec 2015 16:08:58 +0000 (00:08 +0800)]
ext4_journal: fix trans->data_cnt not be decremented

When buffer is not dirty this counter should be decremented.

8 years agomisc: change ext4_config header path in queue & tree modules
gkostka [Tue, 29 Dec 2015 14:30:00 +0000 (15:30 +0100)]
misc: change ext4_config header path in queue & tree modules

8 years agoext4: add doxygen doc for ext4_journal_start and ext4_journal_stop
gkostka [Tue, 29 Dec 2015 14:24:11 +0000 (15:24 +0100)]
ext4: add doxygen doc for ext4_journal_start and ext4_journal_stop

8 years agolwext4_server: fix travis build
gkostka [Tue, 29 Dec 2015 10:33:24 +0000 (11:33 +0100)]
lwext4_server: fix travis build

8 years agoext4_trans: fix return value of ext4_trans_try_revoke_block
gkostka [Tue, 29 Dec 2015 09:58:14 +0000 (10:58 +0100)]
ext4_trans: fix return value of ext4_trans_try_revoke_block

Function ext4_trans_try_revoke_block has been always return EOK,
even if jbd_trans_try_revoke_block fail.

8 years agoext4_filedev: fix travis build
gkostka [Tue, 29 Dec 2015 09:52:26 +0000 (10:52 +0100)]
ext4_filedev: fix travis build

8 years agoIntroduce initial support of ext3/4 journalling.
ngkaho1234 [Mon, 28 Dec 2015 13:05:04 +0000 (13:05 +0000)]
Introduce initial support of ext3/4 journalling.

To achieve this, a glue layer between block cache and lwext4 core routines
is added.

8 years agoext4: add static keyword to ext4_trans_start/stop/abort.
ngkaho1234 [Sat, 26 Dec 2015 13:14:23 +0000 (21:14 +0800)]
ext4: add static keyword to ext4_trans_start/stop/abort.

8 years agoext4: fix ext4_trans_abort looking the same as ext4_trans_stop.
ngkaho1234 [Sat, 26 Dec 2015 13:12:54 +0000 (21:12 +0800)]
ext4: fix ext4_trans_abort looking the same as ext4_trans_stop.

8 years agoext4: add two journalling related routines. See below:
ngkaho1234 [Fri, 25 Dec 2015 10:00:50 +0000 (18:00 +0800)]
ext4: add two journalling related routines. See below:

  - ext4_trans_get_write_access
  - ext4_trans_set_block_dirty

8 years agoext4: do not start new transaction if there is one in use.
ngkaho1234 [Fri, 25 Dec 2015 09:14:21 +0000 (17:14 +0800)]
ext4: do not start new transaction if there is one in use.

8 years agoext4: add ext4_trans_start/stop/abort to high level public routines.
ngkaho1234 [Fri, 25 Dec 2015 09:11:45 +0000 (17:11 +0800)]
ext4: add ext4_trans_start/stop/abort to high level public routines.

8 years agoext4: move journalling start/stop code outside mount/umount.
ngkaho1234 [Thu, 24 Dec 2015 10:32:19 +0000 (18:32 +0800)]
ext4: move journalling start/stop code outside mount/umount.

8 years agoext4: journalling <---> lwext4 main code junction skeleton code.
ngkaho1234 [Thu, 24 Dec 2015 10:14:40 +0000 (18:14 +0800)]
ext4: journalling <---> lwext4 main code junction skeleton code.

8 years agoMove tree.h and queue.h into misc/ directory.
ngkaho1234 [Tue, 29 Dec 2015 07:59:38 +0000 (07:59 +0000)]
Move tree.h and queue.h into misc/ directory.

8 years agoREADME: typo fix
gkostka [Mon, 28 Dec 2015 13:30:36 +0000 (14:30 +0100)]
README: typo fix

8 years agoext4_bcache: remove buffer from LRU tree when it will be dropped.
ngkaho1234 [Mon, 28 Dec 2015 13:15:26 +0000 (13:15 +0000)]
ext4_bcache: remove buffer from LRU tree when it will be dropped.

8 years agoext4_bcache: remove buffer from dirty list when it is invalidated.
ngkaho1234 [Mon, 28 Dec 2015 13:13:42 +0000 (13:13 +0000)]
ext4_bcache: remove buffer from dirty list when it is invalidated.

8 years agoext4_journal: fix block tag written always be the last tag.
ngkaho1234 [Sun, 27 Dec 2015 18:57:38 +0000 (18:57 +0000)]
ext4_journal: fix block tag written always be the last tag.

8 years agoext4_journal: fix jbd_trans_get_access flushing the wrong buffer.
ngkaho1234 [Sun, 27 Dec 2015 17:35:08 +0000 (17:35 +0000)]
ext4_journal: fix jbd_trans_get_access flushing the wrong buffer.

8 years agoext4: during journal test, use jbd_trans_try_revoke_block instead.
ngkaho1234 [Sat, 26 Dec 2015 13:01:44 +0000 (21:01 +0800)]
ext4: during journal test, use jbd_trans_try_revoke_block instead.

8 years agoext4_journal: a more efficient way to track journalled blocks.
ngkaho1234 [Sat, 26 Dec 2015 12:58:57 +0000 (20:58 +0800)]
ext4_journal: a more efficient way to track journalled blocks.

Now we build a RB-Tree in jbd_journal session to track journalled
blocks instead of the one in jbd_trans.

8 years agoRevert "ext4: make sure blocks are not contaminated with data in block cache."
ngkaho1234 [Sat, 26 Dec 2015 11:11:31 +0000 (11:11 +0000)]
Revert "ext4: make sure blocks are not contaminated with data in block cache."

This reverts commit 46c3c339d15e69ac633e122b95861151d6af1c62.

8 years agoext4_balloc: invalidate buffers which have the blocks freed.
ngkaho1234 [Sat, 26 Dec 2015 11:09:55 +0000 (11:09 +0000)]
ext4_balloc: invalidate buffers which have the blocks freed.

8 years agoext4: make sure blocks are not contaminated with data in block cache.
ngkaho1234 [Fri, 25 Dec 2015 18:18:09 +0000 (02:18 +0800)]
ext4: make sure blocks are not contaminated with data in block cache.

8 years agoext4_blockdev: add ext4_block_flush_lba routine.
ngkaho1234 [Fri, 25 Dec 2015 17:39:18 +0000 (01:39 +0800)]
ext4_blockdev: add ext4_block_flush_lba routine.

8 years agoext4_journal: add jbd_trans_try_revoke_block routine.
ngkaho1234 [Fri, 25 Dec 2015 17:26:33 +0000 (01:26 +0800)]
ext4_journal: add jbd_trans_try_revoke_block routine.

8 years agoext4_journal: keep track of blocks added to a transaction.
ngkaho1234 [Fri, 25 Dec 2015 17:16:44 +0000 (01:16 +0800)]
ext4_journal: keep track of blocks added to a transaction.

8 years agoext4_bcache: add ext4_bcache_find_get routines.
ngkaho1234 [Fri, 25 Dec 2015 15:58:05 +0000 (23:58 +0800)]
ext4_bcache: add ext4_bcache_find_get routines.

8 years agoext4: file data read/write now do direct io in case of unaligned io.
ngkaho1234 [Fri, 25 Dec 2015 15:27:21 +0000 (23:27 +0800)]
ext4: file data read/write now do direct io in case of unaligned io.

8 years agoext4_journal: set buffer dirty if it does not belong to any transaction.
ngkaho1234 [Fri, 25 Dec 2015 12:07:01 +0000 (12:07 +0000)]
ext4_journal: set buffer dirty if it does not belong to any transaction.

When calling jbd_trans_set_block_dirty, if a buffer does not belong to
any other transaction, it will be set dirty.

8 years agoext4: remove unnecessary EXT4_MP_UNLOCK in ext4_fsymlink_set.
ngkaho1234 [Fri, 25 Dec 2015 08:38:27 +0000 (16:38 +0800)]
ext4: remove unnecessary EXT4_MP_UNLOCK in ext4_fsymlink_set.

8 years agoext4_journal: add trans parameter to jbd_trans_get_access routine.
ngkaho1234 [Thu, 24 Dec 2015 05:19:10 +0000 (05:19 +0000)]
ext4_journal: add trans parameter to jbd_trans_get_access routine.

8 years agoext4_journal: flush transactions on cp_queue with another method.
ngkaho1234 [Mon, 21 Dec 2015 16:07:44 +0000 (00:07 +0800)]
ext4_journal: flush transactions on cp_queue with another method.

In the past, transactions on checkpoint queue are flushed by
ext4_block_cache_flush routine.

8 years agoext4_journal: two changes on adding block descriptor to a transaction.
ngkaho1234 [Mon, 21 Dec 2015 08:28:48 +0000 (08:28 +0000)]
ext4_journal: two changes on adding block descriptor to a transaction.

  - jbd_trans_add_block is renamed to jbd_trans_set_block_dirty
  - jbd_trans_get_access routine should be called to gain access
    to a buffer.

8 years agoext4_bcache: add ext4_bcache_cleanup routine.
ngkaho1234 [Sun, 20 Dec 2015 10:51:14 +0000 (10:51 +0000)]
ext4_bcache: add ext4_bcache_cleanup routine.

8 years agoext4_bcache: warn on dropping any referenced buffers.
ngkaho1234 [Sun, 20 Dec 2015 10:35:31 +0000 (10:35 +0000)]
ext4_bcache: warn on dropping any referenced buffers.

8 years agoext4_blockdev: flush data only when buffer is dirty and up-to-date.
ngkaho1234 [Sun, 20 Dec 2015 10:26:24 +0000 (10:26 +0000)]
ext4_blockdev: flush data only when buffer is dirty and up-to-date.

8 years agofs_test/lwext4_generic: free rw_buff after use.
ngkaho1234 [Sun, 20 Dec 2015 08:06:55 +0000 (08:06 +0000)]
fs_test/lwext4_generic: free rw_buff after use.

8 years agoext4_journal: fix journalling journal inode resulting in SIGSEGV.
ngkaho1234 [Sun, 20 Dec 2015 07:22:38 +0000 (07:22 +0000)]
ext4_journal: fix journalling journal inode resulting in SIGSEGV.

8 years agoext4_journal: clear end_write and end_write_arg if buffer is not dirty.
ngkaho1234 [Sun, 20 Dec 2015 05:49:53 +0000 (05:49 +0000)]
ext4_journal: clear end_write and end_write_arg if buffer is not dirty.

8 years agoext4_journal: initialize block tag with 0 before writing to it.
ngkaho1234 [Sat, 19 Dec 2015 18:56:22 +0000 (18:56 +0000)]
ext4_journal: initialize block tag with 0 before writing to it.

8 years agoext4_journal: code logic changes on jbd_trans_add_block.
ngkaho1234 [Sat, 19 Dec 2015 18:40:37 +0000 (18:40 +0000)]
ext4_journal: code logic changes on jbd_trans_add_block.

Now jbd_trans_add_block should be called before making any
modications on the buffer.

8 years agoext4_blockdev: allow flushing data to disk while refcount is not 0.
ngkaho1234 [Sat, 19 Dec 2015 17:37:23 +0000 (17:37 +0000)]
ext4_blockdev: allow flushing data to disk while refcount is not 0.

8 years agoext4_journal: make trans the argument passing to jbd_trans_end_write.
ngkaho1234 [Sat, 19 Dec 2015 11:25:25 +0000 (11:25 +0000)]
ext4_journal: make trans the argument passing to jbd_trans_end_write.

8 years agoAdd to readme new windows build instruction
gkostka [Sat, 19 Dec 2015 14:39:43 +0000 (15:39 +0100)]
Add to readme new windows build instruction

8 years agoext4_journal: clear end_write and end_write_arg fields when appropriate.
ngkaho1234 [Fri, 18 Dec 2015 10:23:59 +0000 (10:23 +0000)]
ext4_journal: clear end_write and end_write_arg fields when appropriate.

8 years agoext4_journal: add static keyword to all private functions
gkostka [Fri, 18 Dec 2015 13:51:34 +0000 (14:51 +0100)]
ext4_journal: add static keyword to all private functions

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