From: Liu Yuan <[email protected]>

Also add one liner to emphasis that we piggyback the ctime onto epoch file

Signed-off-by: Liu Yuan <[email protected]>
---
 sheep/store.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sheep/store.c b/sheep/store.c
index 52c4716..d5a080b 100644
--- a/sheep/store.c
+++ b/sheep/store.c
@@ -68,13 +68,14 @@ int update_epoch_log(uint32_t epoch, struct sd_node *nodes, 
size_t nr_nodes)
        }
 
        len = nr_nodes * sizeof(struct sd_node);
-       ret = write(fd, (char *)nodes, len);
+       ret = xwrite(fd, (char *)nodes, len);
        if (ret != len)
                goto err;
 
+       /* Piggyback the epoch creation time for 'collie cluster info' */
        time(&t);
        len = sizeof(t);
-       ret = write(fd, (char *)&t, len);
+       ret = xwrite(fd, (char *)&t, len);
        if (ret != len)
                goto err;
 
-- 
1.7.10.2

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to