From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- src/doc/Commitdir.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/doc/Commitdir.txt (limited to 'src/doc/Commitdir.txt') diff --git a/src/doc/Commitdir.txt b/src/doc/Commitdir.txt new file mode 100644 index 000000000..05c727be6 --- /dev/null +++ b/src/doc/Commitdir.txt @@ -0,0 +1,24 @@ +OLD + + +How Directory Committing Works: + +Each CDir has: + version - current version of directory + committing_version - which version was sent to stable storage + last_committed_version - last version to be safely stored + +Each Inode has: + parent_dir_version - what dir version i was in when i was dirtied. (*) + + (*) note that if you change an inode, mark_dirty() again, even if it's already dirty! + + +How committing works: + +A call to commit_dir(dir, context) will ensure tha the _current_ version is stored safely on disk before the context is finished. + +When a commit completes, inodes in the directory are checked. If they are dirty and belonged to the _committed_ (or earlier) version, then they are marked clean. If they belong to a newer version, then they are _still dirty_. + + + -- cgit v1.2.3