Continued progress with reintroducing testing on the new metadata logging

Now with some tweaks to commit/compact, and a committers for entrylists and
moves specifically. No longer relying on a commitwith callback, the
types of commits are now infered from their tags.

This means we can now commit things atomically with special commits,
such as moves. Now lfs_rename can move entries to new names correctly.
This commit is contained in:
Christopher Haster
2018-05-28 02:08:16 -05:00
parent 0bdaeb7f8b
commit 11a3c8d062
3 changed files with 308 additions and 31 deletions

5
lfs.h
View File

@@ -117,8 +117,8 @@ enum lfs_type {
// internal sources
LFS_FROM_REGION = 0x000,
LFS_FROM_DISK = 0x001,
LFS_FROM_MOVE = 0x002,
LFS_FROM_DISK = 0x200,
LFS_FROM_MOVE = 0x001,
};
// File open flags
@@ -276,6 +276,7 @@ typedef struct lfs_entry {
lfs_block_t block;
lfs_off_t off;
} d;
struct lfs_dir *dir;
} u;
} lfs_entry_t;