Home | History | Annotate | Download | only in blktrace

Lines Matching refs:ch

112 	struct cl_host *ch;
212 * back reference to the host ('ch'), and lists headers (for the host
217 struct cl_host *ch;
1479 len += sprintf(dst + len, "%s-", nc->ch->hostname);
1964 dpp->ch->hostname, dpp->buts_name);
2165 static void ch_add_connection(struct net_server_s *ns, struct cl_host *ch,
2174 nc->ch = ch;
2178 list_add_tail(&nc->ch_head, &ch->conn_list);
2179 ch->connects++;
2186 static void ch_rem_connection(struct net_server_s *ns, struct cl_host *ch,
2192 ch->connects--;
2207 struct cl_host *ch = list_entry(p, struct cl_host, head);
2209 if (in_addr_eq(ch->cl_in_addr, cl_in_addr))
2210 return ch;
2219 struct cl_host *ch;
2221 ch = malloc(sizeof(*ch));
2222 memset(ch, 0, sizeof(*ch));
2224 ch->ns = ns;
2225 ch->cl_in_addr = addr->sin_addr;
2226 list_add_tail(&ch->head, &ns->ch_list);
2229 ch->hostname = strdup(inet_ntoa(addr->sin_addr));
2230 printf("server: connection from %s\n", ch->hostname);
2232 INIT_LIST_HEAD(&ch->conn_list);
2233 INIT_LIST_HEAD(&ch->devpaths);
2235 return ch;
2250 static void net_ch_remove(struct cl_host *ch, int ncpus)
2253 struct net_server_s *ns = ch->ns;
2255 list_for_each_safe(p, q, &ch->devpaths) {
2260 list_for_each_safe(p, q, &ch->conn_list) {
2263 ch_rem_connection(ns, ch, nc);
2266 list_del(&ch->head);
2269 if (ch->hostname)
2270 free(ch->hostname);
2271 free(ch);
2277 struct cl_host *ch;
2288 ch = net_find_client_host(ns, ns->addr.sin_addr);
2289 if (!ch)
2290 ch = net_add_client_host(ns, &ns->addr);
2292 ch_add_connection(ns, ch, fd);
2310 dpp->ch = nc->ch;
2317 list_add_tail(&dpp->head, &nc->ch->devpaths);
2318 nc->ch->ndevs++;
2351 __list_for_each(p, &nc->ch->devpaths) {
2373 nc->ch->hostname, nc->fd);
2423 nc->ch->hostname, nc->fd);
2440 nc->ch->cl_opens++;
2448 if (--nc->ch->cl_opens == 0) {
2449 show_stats(&nc->ch->devpaths);
2450 net_ch_remove(nc->ch, nc->ncpus);