From: Michael Vrable Date: Fri, 10 Sep 2010 22:58:09 +0000 (-0700) Subject: Properly set the starting inode number for allocation after restarting. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=f5a625989f95db5466d358af892301aee8acdc7f;p=bluesky.git Properly set the starting inode number for allocation after restarting. --- diff --git a/bluesky/imap.c b/bluesky/imap.c index a3d27ca..cc8f1ba 100644 --- a/bluesky/imap.c +++ b/bluesky/imap.c @@ -201,12 +201,13 @@ static void bluesky_inode_map_deserialize(BlueSkyFS *fs, BlueSkyCloudLog *imap) for (int j = 0; j < section->links->len; j++) { InodeMapEntry *entry; entry = bluesky_inode_map_lookup(fs->inode_map, *inum, 1); - entry->inum = *inum; + entry->inum = GUINT64_FROM_LE(*inum); entry->item = g_array_index(section->links, BlueSkyCloudLog *, j); bluesky_cloudlog_ref(entry->item); entry->id = entry->item->id; entry->location = entry->item->location; + fs->next_inum = MAX(fs->next_inum, entry->inum + 1); inum++; } g_mutex_unlock(section->lock);