Define struct sk_out in server.h (not server.c)
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 20 Mar 2017 21:28:42 +0000 (23:28 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 21 Mar 2017 13:16:11 +0000 (07:16 -0600)
struct sk_out isn't local to server.c, so it should be visible
in its header (instead of having struct sk_out; in fio.h).

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fio.h
server.c
server.h

diff --git a/fio.h b/fio.h
index 581512fd0ad77d1b748b285bf6df5b2e216edbbf..52a9b75cf4b299fc74928e7bfc99cd94e3bbea1f 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -121,7 +121,6 @@ enum {
  * Per-thread/process specific data. Only used for the network client
  * for now.
  */
  * Per-thread/process specific data. Only used for the network client
  * for now.
  */
-struct sk_out;
 void sk_out_assign(struct sk_out *);
 void sk_out_drop(void);
 
 void sk_out_assign(struct sk_out *);
 void sk_out_drop(void);
 
index 6d5d4ea36ebaf9a774753d6d62c5c50d519c55f7..1b3bc30a0b5c09a29dbef280682e16fb5ae62d71 100644 (file)
--- a/server.c
+++ b/server.c
@@ -50,17 +50,6 @@ struct sk_entry {
        struct flist_head next; /* Other sk_entry's, if linked command */
 };
 
        struct flist_head next; /* Other sk_entry's, if linked command */
 };
 
-struct sk_out {
-       unsigned int refs;      /* frees sk_out when it drops to zero.
-                                * protected by below ->lock */
-
-       int sk;                 /* socket fd to talk to client */
-       struct fio_mutex lock;  /* protects ref and below list */
-       struct flist_head list; /* list of pending transmit work */
-       struct fio_mutex wait;  /* wake backend when items added to list */
-       struct fio_mutex xmit;  /* held while sending data */
-};
-
 static char *fio_server_arg;
 static char *bind_sock;
 static struct sockaddr_in saddr_in;
 static char *fio_server_arg;
 static char *bind_sock;
 static struct sockaddr_in saddr_in;
index 3a1d0b0205a5e96c6d9cb594d19daeec1bcf3ca1..798d5a802b1c25c8990aac461b91ee7a7b899c68 100644 (file)
--- a/server.h
+++ b/server.h
 
 #define FIO_NET_PORT 8765
 
 
 #define FIO_NET_PORT 8765
 
+struct sk_out {
+       unsigned int refs;      /* frees sk_out when it drops to zero.
+                                * protected by below ->lock */
+
+       int sk;                 /* socket fd to talk to client */
+       struct fio_mutex lock;  /* protects ref and below list */
+       struct flist_head list; /* list of pending transmit work */
+       struct fio_mutex wait;  /* wake backend when items added to list */
+       struct fio_mutex xmit;  /* held while sending data */
+};
+
 /*
  * On-wire encoding is little endian
  */
 /*
  * On-wire encoding is little endian
  */