Commit Graph

322 Commits

Author SHA1 Message Date
Alex Young
d87d7a826f Rename the 'debug' cli option 'verbose' and switch default-deny from 'D' to 'd' 2012-06-01 16:58:32 +01:00
Alex Young
8511cacb03 Make sure the -d short option is honoured 2012-06-01 16:47:34 +01:00
Alex Young
29937cdcf9 Merge 2012-06-01 16:25:41 +01:00
Alex Young
1ddb3bb609 Add a self_pipe set of convenience functions 2012-06-01 16:25:27 +01:00
Alex Young
91ab715659 Indentation fix 2012-06-01 16:24:50 +01:00
nick
b985e97098 Automated merge with ssh://dev/flexnbd-c 2012-06-01 14:51:43 +01:00
nick
04d67b3bab acls: Add a default-deny option, which allows you to specify what an empty ACL means.
When this option is specified, an empty ACL means "reject all clients". Without it,
an empty ACL means "accept all clients"
2012-06-01 14:48:34 +01:00
Alex Young
9dbb107bf8 Use nbdtypes to write the nbd hello message 2012-05-31 20:33:42 +01:00
Alex Young
17ed766c74 Null-terminated strings strike again 2012-05-31 18:04:57 +01:00
Alex Young
185a840e03 Factor out the bulk of client_serve_request, and add convenience converters in src/nbdtypes.c 2012-05-31 17:44:11 +01:00
Alex Young
949d7d6a72 Don't check for the INCOMPLETE file on read 2012-05-31 14:11:57 +01:00
Alex Young
1aec12613c Ditch a couple of unneeded variables to silence gcc warnings 2012-05-31 14:09:35 +01:00
Alex Young
81fe41f016 Merge 2012-05-31 13:53:21 +01:00
Alex Young
074efd9fa4 Add a no-op debug() define for non-debug builds and make valgrind optional in nbd_scenarios 2012-05-31 13:53:04 +01:00
Alex Young
c2d1414bff Merge 2012-05-31 13:32:56 +01:00
Alex Young
623a398767 Add a --debug flag for DEBUG builds
If you compile with:

  DEBUG=true rake build

then all the commands get a --debug flag as an option which will make
the server dump crazy amounts of data to stderr.
2012-05-31 13:31:22 +01:00
nick
e863bffe3d Set TCP_NODELAY on our socket. This decreases average NBD read request RTT from 0.3ms to 0.001ms 2012-05-31 11:33:31 +01:00
mbloch
c6dd4fbd89 Merge 2012-05-30 20:14:14 +01:00
Alex Young
15c3133458 Simplify option definition with som handy macros 2012-05-30 17:33:38 +01:00
Alex Young
0102217019 Merge 2012-05-30 15:39:55 +01:00
Alex Young
0c62e66a70 Added getopt_long command-line handling.
All parameters now have switches.  The one gotcha is the parameter which
was overloaded - s_length_or_filename to params_readwrite - is only
pretending to be a length at the moment. If you pass a filename it'll
still work, but the help messages don't mention that.  I'll split the
parameter into two in a later commit.
2012-05-30 15:19:40 +01:00
Alex Young
7832958522 Rearranged the project to have src/ and build/ directories
This simplifies keeping everything clean.
2012-05-30 09:51:20 +01:00