From 86fccad56d2ffd6c65e1571ff87dbf625b8ce55e Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 22 Apr 2014 10:27:23 +0000 Subject: glusterd/snashot: Perform missed snap creates When a brick is started, and the glusterfsd process requests for volfile, the brick_name is sent in the req dict. In glusterd, after fetching the spec the brick_name is looked up in the missed_snap_list, and any missing snap creates on the same brick are performed. After this, the glusterd responds back with the specfile. Also collate brick data from the node's hosting the bricks during restore. In case the data is absent, the local node's data is used. This is needed to ensure that, during a restore we collect the information created when a missed snap create is performed. Change-Id: I47cefdeba96f2702be810965734cf0fac61d3d2d BUG: 1061685 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/7551 Reviewed-by: Santosh Pradhan Reviewed-by: Rajesh Joseph Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- glusterfsd/src/glusterfsd-mgmt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 0febaf20cbd..bcc965696de 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -1643,6 +1643,16 @@ glusterfs_volfile_fetch (glusterfs_ctx_t *ctx) goto out; } + if (cmd_args->brick_name) { + ret = dict_set_dynstr_with_alloc (dict, "brick_name", + cmd_args->brick_name); + if (ret) { + gf_log (THIS->name, GF_LOG_ERROR, + "Failed to set brick_name in request dict"); + goto out; + } + } + ret = dict_allocate_and_serialize (dict, &req.xdata.xdata_val, &req.xdata.xdata_len); if (ret < 0) { -- cgit