~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/doc/Commitdir.txt

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
OLD
 
2
 
 
3
 
 
4
How Directory Committing Works:
 
5
 
 
6
Each CDir has: 
 
7
         version - current version of directory
 
8
         committing_version - which version was sent to stable storage
 
9
         last_committed_version - last version to be safely stored
 
10
 
 
11
Each Inode has: 
 
12
         parent_dir_version - what dir version i was in when i was dirtied.  (*)
 
13
 
 
14
         (*) note that if you change an inode, mark_dirty() again, even if it's already dirty!
 
15
 
 
16
 
 
17
How committing works:
 
18
 
 
19
A call to commit_dir(dir, context) will ensure tha the _current_ version is stored safely on disk before the context is finished.
 
20
 
 
21
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_.
 
22
 
 
23
 
 
24