aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-06 08:09:12 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-06 08:09:12 -0400
commit79b3742f9529d948c9d8e0bf5253098d885233f1 (patch)
treea8eb5bfa6ab12e28ee7d48b166ee90ea86207385
parent9b5287ecb52dc2aefe429b5d09b4bc33e238ba2a (diff)
downloaddbfs-79b3742f9529d948c9d8e0bf5253098d885233f1.tar.gz
Update docs.
-rw-r--r--NEWS8
-rw-r--r--SCHEMA47
2 files changed, 51 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index aaaad1c..0a843d5 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,12 @@
+Version 0.5 -- Not yet released.
+
+- Still completely untested. Probably doesn't work.
+- Implement rename, statfs, fsync, fsyncdir, setattr ops.
+- Implement write op.
+- Special case handling of all-zero blocks.
+- Add GPL copyright headers to source code.
+
Version 0.4 -- August 5, 2006
- Still completely untested. Probably doesn't work.
diff --git a/SCHEMA b/SCHEMA
index d7897c3..ff5a859 100644
--- a/SCHEMA
+++ b/SCHEMA
@@ -9,12 +9,23 @@ DB_HOME: database home dir, for transaction database + logs
DB_PASSWORD: if present, AES-encrypt database with this password
db4 environment
----------------
- "metadata": metadata database
+===============
+ "metadata": metadata
page size 512
little endian byte order
+ "hash": hash refence counts
+ page size 512
+ little endian byte order
+ "data": user data storage
+ page size 2048
+ little endian byte order
optionally encrypted w/ DB4 AES encryption
+
+database "metadata"
+===================
+
+
inode
-----
key: /inode/%Lu (%Lu == inode number)
@@ -36,8 +47,14 @@ guint64 mtime: file last-modified time
struct dbfs_extent blocks[0]: array of extents, describing inode data
struct dbfs_extent:
-dbfs_blk_id_t id: 20-byte sha1 hash of data
-guint64 size: size of data block
+dbfs_blk_id_t id: 20-byte sha1 hash of DB-returned data block
+guint32 off: fragment's offset into DB-returned data
+guint32 len: length of fragment
+
+NOTE: sha1 hash covers the entire data block, as originally written to
+the database. File modifications may cause 'off' and 'len' to change,
+which implies that 'id' is no longer the sha1 hash of the current
+fragment.
directories
@@ -84,3 +101,25 @@ guint32 namelen length of attribute name
char name[0] UTF8 attribute name (namelen bytes)
0-7 bytes alignment padding
+
+
+database "data"
+===============
+Used for all data storage. Each file is broken up into chunks of no
+more than DBFS_MAX_EXT_LEN (4MB) bytes, called extents.
+
+key: 20-byte SHA-1 hash of data contents
+value: variable-length binary data
+
+
+
+database "hash"
+===============
+Used for keeping a reference count of each item in database "data".
+
+key: 20-byte SHA-1 hash of data contents
+value: struct dbfs_hashref
+
+struct dbfs_hashref:
+guint32 refs Object reference count.
+