Commit Graph

367 Commits

Author SHA1 Message Date
nick
682f3c70ef Automated merge with ssh://dev/flexnbd-c 2012-06-06 10:03:46 +01:00
nick
3e0628e2fc flexnbd: Re-add --sock to flexnbd mirror 2012-06-06 09:55:47 +01:00
nick
8a2fd06c31 flexnbd: Add --bind to flexnbd read and flexnbd write 2012-06-06 09:55:08 +01:00
Matthew Bloch
60cb089e45 Added fuzzer which currently exposes ugly bug with unaligned writes. 2012-06-06 01:28:54 +01:00
Matthew Bloch
d981dde8d1 Fixed FlexNBD#serve parameters, added detection of non-starting server. 2012-06-06 01:28:30 +01:00
Matthew Bloch
2245385117 Added msync() call after every write - not sure whether it's necessary yet. 2012-06-06 01:27:37 +01:00
Matthew Bloch
29151b8a78 Isolated missing library code to pkg:deb task - couldn't locate library code
(must be available from Debian, or bundled).
2012-06-05 23:46:28 +01:00
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
b90b73fba6 build and default rake tasks, because I keep trying to type them 2012-05-31 14:01:49 +01:00
Alex Young
49c4ef7c56 Add .orig merge files to .hgignore 2012-05-31 13:55: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
Alex Young
268bebd408 Run the nbd_scenario tests under valgrind 2012-05-31 13:23:12 +01:00
nick
71e755906b Make the Rakefile take note of DEBUG= 2012-05-31 12:12:32 +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
mbloch
cd976d1c2c Fixed short copies of struct sockaddr (it's shorter than sockaddr_in6!)
which was giving duff results when comparing IPv6 ACL entries.
2012-05-30 20:13:56 +01:00
Alex Young
42599fe01e Make sure we build arch-specific packages 2012-05-30 18:11:32 +01:00
Alex Young
f21dd9e888 Basic debian packaging
Add a build dependency on rake_utils, but we get simple debian packages
out of it.
2012-05-30 17:35:07 +01:00
Alex Young
15c3133458 Simplify option definition with som handy macros 2012-05-30 17:33:38 +01:00
Alex Young
fe08084144 Added tag 0.0.1 for changeset 27409c2c1313 2012-05-30 17:11:10 +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
a01621dc1e Added .h files to the Rakefile 2012-05-30 15:06:06 +01:00
mbloch
6d8afd1035 Fixed bug where ACL was accidentally deleted when being set from control
socket.
2012-05-30 13:03:02 +01:00
nick
46ceb85aec Fix the usage message 2012-05-30 11:28:32 +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
mbloch
cf2400fedd Fixed race in tests. 2012-05-29 17:01:54 +01:00
Matthew Bloch
21ccd17ea5 Added .INCOMPLETE hack to aid with marking finished transfers. 2012-05-29 11:24:24 +01:00
Matthew Bloch
ab0dfb5eca Added mirror write barrier / final pass stuff & clean exit afterwards.
Plenty of code documentation.
2012-05-29 04:03:28 +01:00
mbloch
dcb1633b8b Lots of errors spotted by Alex fixed, added mutexes to accept & I/O, added
"remote" commands to set ACL, start mirror etc.
2012-05-29 00:59:12 +01:00
Matthew Bloch
c54d4a68ba Added another write/read test, fixed bugs in splice() usage and IPv6
socket handling.
2012-05-27 14:40:16 +01:00
Matthew Bloch
5a5041a751 First few external tests with test/unit, some minor tidying of internal data
structures.
2012-05-24 01:39:35 +01:00
mbloch
d5d6e0f55d Pulled some duplicated code out of control.c into
read_lines_until_blankline.
2012-05-23 14:03:30 +01:00
Matthew Bloch
9c26f7f36f Split control-socket functions into separate file. 2012-05-23 00:42:14 +01:00
Matthew Bloch
811e4ab2cd Fixed mirroring to work (error reporting suspect though). 2012-05-22 00:22:06 +01:00
Matthew Bloch
7eaf5c3fd3 Initial, untested mirror implementation and resolved some type confusion
around struct ip_and_mask pointers (no idea how it worked before).  Added a
header for readwrite.h used in mirror implementation.
2012-05-21 04:03:17 +01:00