Commit 74a9fe09 authored by Filippos Giannakos's avatar Filippos Giannakos

Make xsegbd use xseg_reply_info struct

parent 2d818823
......@@ -515,7 +515,8 @@ int update_dev_sectors_from_request( struct xsegbd_device *xsegbd_dev,
XSEGLOG("Invalid xsegbd_dev");
return -ENOENT;
}
xsegbd_dev->sectors = *((uint64_t *) data) / 512ULL;
struct xseg_reply_info *xreply = (struct xseg_reply_info *)data;
xsegbd_dev->sectors = xreply->size / 512ULL;
return 0;
}
......
......@@ -454,9 +454,10 @@ static int mapping_info(struct peerd *peer, struct peer_req *pr)
vio->err = 1;
}
else {
struct xseg_reply_info *xinfo = (struct xseg_reply_info *) xseg_get_data(peer->xseg, vio->mreq);
struct xseg_reply_info *xinfo = (struct xseg_reply_info *)xseg_get_data(peer->xseg, vio->mreq);
char *data = xseg_get_data(peer->xseg, pr->req);
*(uint64_t *)data = xinfo->size;
struct xseg_reply_info *xreply = (struct xseg_reply_info *)data;
xreply->size = xinfo->size;
}
xseg_put_request(peer->xseg, vio->mreq, pr->portno);
vio->mreq = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment