projects
/
bluesky.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add in some support for journal replay.
[bluesky.git]
/
bluesky
/
cloudlog.c
diff --git
a/bluesky/cloudlog.c
b/bluesky/cloudlog.c
index
40067fd
..
bf7d22e
100644
(file)
--- a/
bluesky/cloudlog.c
+++ b/
bluesky/cloudlog.c
@@
-78,7
+78,7
@@
guint bluesky_cloudlog_hash(gconstpointer a)
* before writing a batch to the cloud, handling indirection through items like
* the inode map, etc. */
* before writing a batch to the cloud, handling indirection through items like
* the inode map, etc. */
-BlueSkyCloudLog *bluesky_cloudlog_new(BlueSkyFS *fs)
+BlueSkyCloudLog *bluesky_cloudlog_new(BlueSkyFS *fs
, const BlueSkyCloudID *id
)
{
BlueSkyCloudLog *log = g_new0(BlueSkyCloudLog, 1);
{
BlueSkyCloudLog *log = g_new0(BlueSkyCloudLog, 1);
@@
-86,7
+86,10
@@
BlueSkyCloudLog *bluesky_cloudlog_new(BlueSkyFS *fs)
log->cond = g_cond_new();
log->fs = fs;
log->type = LOGTYPE_UNKNOWN;
log->cond = g_cond_new();
log->fs = fs;
log->type = LOGTYPE_UNKNOWN;
- log->id = bluesky_cloudlog_new_id();
+ if (id != NULL)
+ memcpy(&log->id, id, sizeof(BlueSkyCloudID));
+ else
+ log->id = bluesky_cloudlog_new_id();
log->links = g_array_new(FALSE, TRUE, sizeof(BlueSkyCloudLog *));
g_atomic_int_set(&log->refcount, 1);
log->links = g_array_new(FALSE, TRUE, sizeof(BlueSkyCloudLog *));
g_atomic_int_set(&log->refcount, 1);