From: Michael Vrable <mvrable@cs.ucsd.edu>
Date: Wed, 16 Sep 2009 18:28:56 +0000 (-0700)
Subject: Add a little support for data writeback (not yet hooked up).
X-Git-Url: http://git.vrable.net/?a=commitdiff_plain;h=45a4f324927f8fe3b7e689dd0c9a28716d0d1e93;p=bluesky.git

Add a little support for data writeback (not yet hooked up).
---

diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h
index 1d0b0b1..09d2755 100644
--- a/bluesky/bluesky.h
+++ b/bluesky/bluesky.h
@@ -128,7 +128,12 @@ typedef struct {
      * that we don't exhaust the identifier space. */
     uint64_t inum;
 
-    uint64_t change_count;      /* Incremented each with each change made */
+    /* change_count is increased with every operation which modifies the inode,
+     * and can be used to determine if cached data is still valid.
+     * change_commit is the value of change_count when the inode was last
+     * committed to stable storage. */
+    uint64_t change_count, change_commit;
+
     int64_t atime;              /* Microseconds since the Unix epoch */
     int64_t ctime;
     int64_t mtime;