Include inode numbers in cloud log items.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 7 Sep 2010 20:28:42 +0000 (13:28 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Tue, 7 Sep 2010 20:28:42 +0000 (13:28 -0700)
bluesky/bluesky-private.h
bluesky/cloudlog.c
bluesky/serialize.c

index e1313c5..5bb18f9 100644 (file)
@@ -210,6 +210,7 @@ struct cloudlog_header {
     char magic[4];
     uint8_t type;
     BlueSkyCloudID id;
+    uint64_t inum;
     uint32_t size1, size2, size3;
 } __attribute__((packed));
 
index 0581bfc..9d2fe37 100644 (file)
@@ -308,6 +308,7 @@ BlueSkyCloudPointer bluesky_cloudlog_serialize(BlueSkyCloudLog *log,
     header.size2 = GUINT32_TO_LE(data2->len);
     header.size3 = GUINT32_TO_LE(data3->len);
     header.id = log->id;
+    header.inum = GUINT64_TO_LE(log->inum);
 
     g_string_append_len(state->data, (const char *)&header, sizeof(header));
     g_string_append_len(state->data, data1->str, data1->len);
index 4faff39..dc23cac 100644 (file)
@@ -312,7 +312,7 @@ void bluesky_deserialize_cloudlog(BlueSkyCloudLog *item,
         data3 = data2 + len2;
         g_assert(data3 + len3 - data <= len);
         item->type = header->type - '0';
-        //item->inum = GUINT64_FROM_LE(header->inum);
+        item->inum = GUINT64_FROM_LE(header->inum);
     }
 
     BlueSkyFS *fs = item->fs;