From 8d8816e80ea425b24cfb20f8fa714cbf821e916c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sun, 31 Oct 2010 20:33:37 +0100 Subject: [PATCH] Removed doc directory --- doc/design.txt | 66 -------------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 doc/design.txt diff --git a/doc/design.txt b/doc/design.txt deleted file mode 100644 index 97071bb50..000000000 --- a/doc/design.txt +++ /dev/null @@ -1,66 +0,0 @@ -chunk_cache -bandstore -dedupestore => dds -init command - - -TODO ----- -* Remote stores -* Stat and chunk cache - -DONE ----- -* Encryption -* Hard links -* cache redesign -* Symbolic links -* Owner, group, mode, ctime, mtime - -cache = Cache(path,) - -for file in files: - chunks = chunkify(file) - for chunk in chunkify(file): - if chunk.sha in cache: - cache.chunk_inc_ref(chunk) - else: - fs.add_chunk(chunk) - - entry = Entry - archive.add(entry) -Repository layout ------------------ -REPO/README -REPO/VERSION -REPO/tid = x -REPO/data/ -REPO/txn-active/tid -REPO/txn-active/add// -REPO/txn-active/delete// -REPO/txn-active/tid -REPO/txn-commit/add// -REPO/txn-commit/delete// - -REPO/archives/ -REPO/blocks/XX/YY/XYZ - -txn_completed/add// -txn_completed/delete// - -API ---- -""" -class Cache(object): - - def chunk_inc_ref(self, chunk): - self.chunk_refcount.setdefault(chunk.sha, 0) - self.chunk_refcount[chunk.sha] += 1 - - def chunk_dec_ref(self, chunk): - assert self.chunk_refcount.get(chunk.sha, 0) > 0 - self.chunk_refcount[chunk.sha] -= 1 - if self.chunk_refcount[chunk.sha] == 0: - self.fs.delete_chunk(self.sha) - -txn = txn_begin()