lwext4.git
8 years agoUpdate README.md v1.0.0
gkostka [Tue, 9 Feb 2016 21:30:21 +0000 (22:30 +0100)]
Update README.md

8 years agoBump lwext4 version to 1.0.0 & changelog update
gkostka [Tue, 9 Feb 2016 21:06:05 +0000 (22:06 +0100)]
Bump lwext4 version to 1.0.0 & changelog update

8 years agoUpdate README.md
gkostka [Tue, 9 Feb 2016 20:34:33 +0000 (21:34 +0100)]
Update README.md

8 years agoext4_extent: return immediately when ext4_ext_correct_indexes fails.
ngkaho1234 [Thu, 4 Feb 2016 15:39:00 +0000 (15:39 +0000)]
ext4_extent: return immediately when ext4_ext_correct_indexes fails.

8 years agoext4_extent: fix passing wrong size to memmove.
ngkaho1234 [Thu, 4 Feb 2016 15:28:05 +0000 (15:28 +0000)]
ext4_extent: fix passing wrong size to memmove.

8 years agoFix prefix_patch toolkit.
ngkaho1234 [Wed, 3 Feb 2016 16:40:39 +0000 (16:40 +0000)]
Fix prefix_patch toolkit.

8 years agoFix type mismatch.
ngkaho1234 [Wed, 3 Feb 2016 14:17:47 +0000 (22:17 +0800)]
Fix type mismatch.

8 years agoRemove unnecessary stdio.h .
ngkaho1234 [Wed, 3 Feb 2016 10:29:28 +0000 (10:29 +0000)]
Remove unnecessary stdio.h .

8 years agoAdd toolkit that helps adding prefix to flags and errno V2.
ngkaho1234 [Sat, 30 Jan 2016 14:33:21 +0000 (22:33 +0800)]
Add toolkit that helps adding prefix to flags and errno V2.

8 years agoAdd toolkit that helps adding prefix to flags and errno.
ngkaho1234 [Thu, 28 Jan 2016 14:49:38 +0000 (22:49 +0800)]
Add toolkit that helps adding prefix to flags and errno.

8 years agoext4_mkfs: move roundup and align macros to misc header
gkostka [Mon, 1 Feb 2016 18:50:03 +0000 (19:50 +0100)]
ext4_mkfs: move roundup and align macros to misc header

8 years agoFix travis build
gkostka [Mon, 1 Feb 2016 18:35:50 +0000 (19:35 +0100)]
Fix travis build

Use never version of gcc 4.8

8 years agoRelocate other in-memory data structures from ext4_types.h
ngkaho1234 [Mon, 1 Feb 2016 03:18:15 +0000 (03:18 +0000)]
Relocate other in-memory data structures from ext4_types.h

These include ext4_inode_ref, ext4_dir_iter, ext4_dir_search_result
and ext4_dir_idx_block.

8 years agoRefactor header files dependencies.
ngkaho1234 [Sun, 31 Jan 2016 14:31:05 +0000 (22:31 +0800)]
Refactor header files dependencies.

8 years agoext4_mkfs: field 'len' of ext4_mkfs_info should be unsigned.
ngkaho1234 [Sun, 31 Jan 2016 09:40:09 +0000 (09:40 +0000)]
ext4_mkfs: field 'len' of ext4_mkfs_info should be unsigned.

8 years agoext4_fs: fix read_only not being set on ext4_fs structure.
ngkaho1234 [Sat, 30 Jan 2016 18:28:04 +0000 (18:28 +0000)]
ext4_fs: fix read_only not being set on ext4_fs structure.

8 years agoext4: fix ext4_fread failing when fs on read-only mode.
ngkaho1234 [Sat, 30 Jan 2016 17:25:51 +0000 (17:25 +0000)]
ext4: fix ext4_fread failing when fs on read-only mode.

8 years agoext4: add read_only parameter to ext4_mount routine.
ngkaho1234 [Sat, 30 Jan 2016 15:26:22 +0000 (23:26 +0800)]
ext4: add read_only parameter to ext4_mount routine.

Now users can mount a filesystem as read-only mode explicitly.

8 years agoCMake: now ext4_config.h will be automatically generated.
ngkaho1234 [Thu, 28 Jan 2016 16:18:58 +0000 (00:18 +0800)]
CMake: now ext4_config.h will be automatically generated.

8 years agoReconstruct source directory tree.
ngkaho1234 [Thu, 28 Jan 2016 14:46:36 +0000 (22:46 +0800)]
Reconstruct source directory tree.

8 years agobfin-elf.cmake: set -std=gnu99 for blackfin targets (unsupported gnu11)
gkostka [Wed, 27 Jan 2016 22:50:38 +0000 (23:50 +0100)]
bfin-elf.cmake: set -std=gnu99 for blackfin targets (unsupported gnu11)

8 years agoext4: ext4_chmod now only allows modifying the lowest 12bit of i_mode.
ngkaho1234 [Tue, 26 Jan 2016 06:15:35 +0000 (06:15 +0000)]
ext4: ext4_chmod now only allows modifying the lowest 12bit of i_mode.

8 years agoMove file opening & seeking flags to a separate header file.
ngkaho1234 [Mon, 25 Jan 2016 09:03:44 +0000 (09:03 +0000)]
Move file opening & seeking flags to a separate header file.

8 years agoReduce the number of errno definitions in ext4_errno.h.
root [Sun, 24 Jan 2016 05:53:46 +0000 (05:53 +0000)]
Reduce the number of errno definitions in ext4_errno.h.

8 years agoAdd type cast to eliminate compiler warning messages.
ngkaho1234 [Sun, 24 Jan 2016 04:24:03 +0000 (04:24 +0000)]
Add type cast to eliminate compiler warning messages.

8 years agoext4_ialloc: fix using uint32_t as block address.
ngkaho1234 [Sat, 23 Jan 2016 17:19:11 +0000 (17:19 +0000)]
ext4_ialloc: fix using uint32_t as block address.

8 years agoext4_config: set CONFIG_HAVE_OWN_ERRNO default value to 0
gkostka [Sat, 23 Jan 2016 16:37:24 +0000 (17:37 +0100)]
ext4_config: set CONFIG_HAVE_OWN_ERRNO default value to 0

8 years agoSpecify flags without -Wextra for non-gcc compilers.
ngkaho1234 [Sat, 23 Jan 2016 14:35:58 +0000 (22:35 +0800)]
Specify flags without -Wextra for non-gcc compilers.

8 years agoext4_filedev: use ftello instead of ftell.
ngkaho1234 [Sat, 23 Jan 2016 08:16:42 +0000 (08:16 +0000)]
ext4_filedev: use ftello instead of ftell.

8 years agoext4_debug: eliminate warning messages when assert is disabled.
ngkaho1234 [Sat, 23 Jan 2016 04:20:10 +0000 (04:20 +0000)]
ext4_debug: eliminate warning messages when assert is disabled.

8 years agoAdd 'lib_only' build target.
ngkaho1234 [Sat, 23 Jan 2016 03:28:20 +0000 (03:28 +0000)]
Add 'lib_only' build target.

Under this target, only a basic library will be built.

8 years agoFix __unused definition on non-gnuc platforms.
ngkaho1234 [Fri, 22 Jan 2016 17:31:44 +0000 (17:31 +0000)]
Fix __unused definition on non-gnuc platforms.

8 years agoRewrite __attribute__((packed)) as pragmas.
ngkaho1234 [Fri, 22 Jan 2016 10:51:39 +0000 (18:51 +0800)]
Rewrite __attribute__((packed)) as pragmas.

8 years agoext4_bcache: do not allow cache shaking when callback is invoked.
ngkaho1234 [Thu, 21 Jan 2016 15:53:41 +0000 (23:53 +0800)]
ext4_bcache: do not allow cache shaking when callback is invoked.

8 years agoext4_journal: two changes below.
ngkaho1234 [Thu, 21 Jan 2016 07:59:35 +0000 (07:59 +0000)]
ext4_journal: two changes below.

  - reset end_write(_arg) to NULL when buffer is invalidated.
  - set lb_id to @lba when a direct call to ext4_bcache_find_get succeeds.

8 years agoext4_journal: flush dirty buffers which have BC_TMP flag set.
ngkaho1234 [Thu, 21 Jan 2016 02:24:09 +0000 (02:24 +0000)]
ext4_journal: flush dirty buffers which have BC_TMP flag set.

8 years agoext4_journal: code logic optimization. See below.
ngkaho1234 [Tue, 19 Jan 2016 01:10:37 +0000 (01:10 +0000)]
ext4_journal: code logic optimization. See below.

  - reset buffer's end_write(_arg) fields only when buffer belongs to
    a transaction.

8 years agoext4_journal: abort a buffer when its data is discarded.
ngkaho1234 [Tue, 19 Jan 2016 00:57:59 +0000 (00:57 +0000)]
ext4_journal: abort a buffer when its data is discarded.

8 years agoext4_journal: remove pending transaction support. (useless)
ngkaho1234 [Sun, 17 Jan 2016 04:25:41 +0000 (04:25 +0000)]
ext4_journal: remove pending transaction support. (useless)

8 years agoext4_journal: the allocation in jbd_journal_flush_trans must succeed.
ngkaho1234 [Sun, 17 Jan 2016 02:37:23 +0000 (02:37 +0000)]
ext4_journal: the allocation in jbd_journal_flush_trans must succeed.

8 years agoext4_bcache: remove EXT4_BCACHE_STATIC_INSTANCE obsolete macro
gkostka [Sat, 16 Jan 2016 19:37:29 +0000 (20:37 +0100)]
ext4_bcache: remove EXT4_BCACHE_STATIC_INSTANCE obsolete macro

Cache can't be created in static way anymore

8 years agoext4: remove ext4_test_journal function
gkostka [Sat, 16 Jan 2016 19:31:10 +0000 (20:31 +0100)]
ext4: remove ext4_test_journal function

This function should not be in standard lwext4 API

8 years agoext4_journal: flushes buffers claimed by multiple transactions.
ngkaho1234 [Sat, 16 Jan 2016 18:28:18 +0000 (02:28 +0800)]
ext4_journal: flushes buffers claimed by multiple transactions.

8 years agoext4: complete the descriptions of extended attribute routines.
ngkaho1234 [Sat, 16 Jan 2016 16:06:18 +0000 (00:06 +0800)]
ext4: complete the descriptions of extended attribute routines.

8 years agoext4_fs: a space fix.
ngkaho1234 [Sat, 16 Jan 2016 13:19:58 +0000 (13:19 +0000)]
ext4_fs: a space fix.

8 years agoext4_dir_idx: ext4_dir_dx_init now only append file when necessary.
ngkaho1234 [Sat, 16 Jan 2016 13:19:31 +0000 (13:19 +0000)]
ext4_dir_idx: ext4_dir_dx_init now only append file when necessary.

8 years agoext4: introduce ext4_trunc_dir specific to removing directory.
ngkaho1234 [Sat, 16 Jan 2016 13:18:03 +0000 (13:18 +0000)]
ext4: introduce ext4_trunc_dir specific to removing directory.

8 years agoext4_config: introduce CONFIG_JOURNALING_ENABLE configuration switch
gkostka [Sat, 16 Jan 2016 11:50:13 +0000 (12:50 +0100)]
ext4_config: introduce CONFIG_JOURNALING_ENABLE configuration switch

Disabling journaling at compile time will reduce footprint
size significantly.

8 years agoext4_config: add ul to CONFIG_MAX_TRUNCATE_SIZE
gkostka [Sat, 16 Jan 2016 10:35:29 +0000 (11:35 +0100)]
ext4_config: add ul to CONFIG_MAX_TRUNCATE_SIZE

8 years agoext4: fix entering a dead loop when ext4_dir_rm failed.
ngkaho1234 [Sat, 16 Jan 2016 04:01:17 +0000 (04:01 +0000)]
ext4: fix entering a dead loop when ext4_dir_rm failed.

8 years agoext4: bring the support of recursive removal of directory back.
ngkaho1234 [Fri, 15 Jan 2016 15:41:29 +0000 (23:41 +0800)]
ext4: bring the support of recursive removal of directory back.

8 years agoext4_extent: some comments cleanup in ext4_ext_correct_indexes.
ngkaho1234 [Fri, 15 Jan 2016 09:58:54 +0000 (09:58 +0000)]
ext4_extent: some comments cleanup in ext4_ext_correct_indexes.

8 years agoRemove simple extent implementation.
ngkaho1234 [Fri, 15 Jan 2016 04:33:56 +0000 (04:33 +0000)]
Remove simple extent implementation.

8 years agoNumorous changes. See below:
ngkaho1234 [Thu, 14 Jan 2016 12:02:43 +0000 (12:02 +0000)]
Numorous changes. See below:

  - ext4: ext4_trunc_inode now requires inode index instead of an
          existing inode_ref.
  - ext4: the support of removing directory recursively is temporarily
          dropped.
  - ext4: ext4_dir_rm temporarily relies on ext4_fs_truncate instead of
          ext4_trunc_inode to ensure directory inode not having 0
          length in case of power failure.

  - ext4_journal: connect transactions having reference to the same blocks
                  together.

8 years agoext4_trans: flush the buffer in the following case.
ngkaho1234 [Mon, 11 Jan 2016 11:58:44 +0000 (11:58 +0000)]
ext4_trans: flush the buffer in the following case.

When we are not running a transaction, but have enabled journalling,
we should flush the buffer when we free the corresponding block.

8 years agoext4_journal: fix mistreating an empty journal as a bad one.
ngkaho1234 [Mon, 11 Jan 2016 11:48:16 +0000 (11:48 +0000)]
ext4_journal: fix mistreating an empty journal as a bad one.

8 years agoext4_mkfs: fix mkfs function when journaling is enabled
gkostka [Sun, 10 Jan 2016 11:40:30 +0000 (12:40 +0100)]
ext4_mkfs: fix mkfs function when journaling is enabled

8 years agoext4: introduce ext4_trunc_inode to deal with ftruncate operation
gkostka [Sun, 10 Jan 2016 10:29:54 +0000 (11:29 +0100)]
ext4: introduce ext4_trunc_inode to deal with ftruncate operation

Truncate operations might consume a lot of blocks. New function
will split one big transacion into a numerous of smaller ones.
CONFIG_MAX_TRUNCATE_SIZE limits single inode truncate size.

8 years agoext4_journal: fix transaction sequence not being checksummed.
ngkaho1234 [Sat, 2 Jan 2016 10:50:47 +0000 (10:50 +0000)]
ext4_journal: fix transaction sequence not being checksummed.

8 years agoext4_journal: add JBD_FEATURE_COMPAT_CHECKSUM support.
ngkaho1234 [Sat, 2 Jan 2016 10:39:32 +0000 (10:39 +0000)]
ext4_journal: add JBD_FEATURE_COMPAT_CHECKSUM support.

8 years agoext4_journal: fix using wrong algorithm on journal checksum v2/v3.
ngkaho1234 [Sat, 2 Jan 2016 10:30:57 +0000 (10:30 +0000)]
ext4_journal: fix using wrong algorithm on journal checksum v2/v3.

8 years agoext4: rework ext4_dir_rm to split it into many small transactions.
ngkaho1234 [Sat, 2 Jan 2016 03:36:09 +0000 (03:36 +0000)]
ext4: rework ext4_dir_rm to split it into many small transactions.

8 years agoext4_journal: initial support of journal checksumming is added.
ngkaho1234 [Fri, 1 Jan 2016 13:48:10 +0000 (13:48 +0000)]
ext4_journal: initial support of journal checksumming is added.

8 years agoext4_bcache: add BC_TMP flag.
ngkaho1234 [Thu, 31 Dec 2015 14:06:03 +0000 (22:06 +0800)]
ext4_bcache: add BC_TMP flag.

8 years agoext4_bcache: add max cache depth watermark
gkostka [Thu, 31 Dec 2015 11:02:24 +0000 (12:02 +0100)]
ext4_bcache: add max cache depth watermark

8 years agotest_lwext4: add error printf when file/dir remove fails
gkostka [Thu, 31 Dec 2015 11:01:32 +0000 (12:01 +0100)]
test_lwext4: add error printf when file/dir remove fails

8 years agoext4_crc32: a number of changes to ext4_crc32c module.
ngkaho1234 [Thu, 31 Dec 2015 08:22:58 +0000 (08:22 +0000)]
ext4_crc32: a number of changes to ext4_crc32c module.

  - ext4_crc32c module is renamed to ext4_crc32
  - changes on parameter names are made to ext4_crc32c routine prototype
  - add crc32 as internal routine to implement ext4_crc32 and
    ext4_crc32c
  - add ext4_crc32 checksum routine

8 years agofs_test: add version string printf in test apps
gkostka [Thu, 31 Dec 2015 00:42:07 +0000 (01:42 +0100)]
fs_test: add version string printf in test apps

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.