X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=bluesky%2Fcloudlog.c;h=40067fd3661f91d4ec9e45a9019a73d9043c8bd6;hb=a82b60b3b683840a7074110831bcbaa16a40f0eb;hp=0356c7db7bc3b0cdd455a8c214323d9f5444dfb5;hpb=8ea73bbfba8c53cdaf41f2abf47bec389d1fa8ba;p=bluesky.git diff --git a/bluesky/cloudlog.c b/bluesky/cloudlog.c index 0356c7d..40067fd 100644 --- a/bluesky/cloudlog.c +++ b/bluesky/cloudlog.c @@ -265,6 +265,16 @@ BlueSkyCloudPointer bluesky_cloudlog_serialize(BlueSkyCloudLog *log, g_string_append_len(state->data, (const char *)&header, sizeof(header)); g_string_append_len(state->data, log->data->data, log->data->len); + /* If the object we flushed was an inode, update the inode map. */ + if (log->type == LOGTYPE_INODE) { + g_mutex_lock(fs->lock); + InodeMapEntry *entry = bluesky_inode_map_lookup(fs->inode_map, + log->inum, 1); + entry->id = log->id; + entry->location = log->location; + g_mutex_unlock(fs->lock); + } + /* TODO: We should mark the objects as committed on the cloud until the * data is flushed and acknowledged. */ log->pending_write |= CLOUDLOG_CLOUD;