> +static void init_write_info(struct write_info *wi) > +{ > + int i; > + for (i = 0; i < SD_MAX_REDUNDANCY; i++) { > + wi->pfds[i].fd = -1; > + wi->vnodes[i] = NULL; > + } > + wi->nr_sent = 0; Oh you actually add this helper here - I thin it should be there from the beginning. > @@ -121,107 +207,51 @@ int forward_write_obj_req(struct request *req) > oid_to_vnodes(req->vnodes, oid, nr_copies, obj_vnodes); > for (i = 0; i < nr_copies; i++) { > v = obj_vnodes[i]; > + if (!vnode_is_local(v)) > continue; > ret = do_local_io(req, fwd_hdr.epoch); Any reason you start the local I/O before the remote one? Usually local I/O will be faster, so kicking off the remote I/O first and then the local I/O will deliver better latency. |