From: Michael Vrable Date: Tue, 7 Sep 2010 20:28:42 +0000 (-0700) Subject: Include inode numbers in cloud log items. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=881bb3ee9aa6088415461f6efdb04c3638af1a22;p=bluesky.git Include inode numbers in cloud log items. --- diff --git a/bluesky/bluesky-private.h b/bluesky/bluesky-private.h index e1313c5..5bb18f9 100644 --- a/bluesky/bluesky-private.h +++ b/bluesky/bluesky-private.h @@ -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)); diff --git a/bluesky/cloudlog.c b/bluesky/cloudlog.c index 0581bfc..9d2fe37 100644 --- a/bluesky/cloudlog.c +++ b/bluesky/cloudlog.c @@ -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); diff --git a/bluesky/serialize.c b/bluesky/serialize.c index 4faff39..dc23cac 100644 --- a/bluesky/serialize.c +++ b/bluesky/serialize.c @@ -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;