5930f25034Use client stop signals for thread stopping
Alex Young
2012-06-07 14:25:30 +01:00
40f0f9fab6Big bit of debug output in write_not_zeroes (disabled).
Matthew Bloch
2012-06-07 12:28:21 +01:00
d763ab4e74Fixed bug in bitset_run_count which was causing data corruptionn writing around sparse boundaries.
Matthew Bloch
2012-06-07 12:27:46 +01:00
3810a8210fAdded some record-keeping / printing to fuzzer to assist with backtracking.
Matthew Bloch
2012-06-07 12:25:56 +01:00
a90f84972bAdd stop signals to client threads
Alex Young
2012-06-07 11:44:19 +01:00
5710431780Refactored write_not_zeroes to use struct bitset_mapping instead of repeating all that code (has not fixed earlier bug yet, but lots of repetition cut).
Matthew Bloch
2012-06-07 11:17:02 +01:00
08f3d42b34Improved fuzz test to find an actual code bug (previous bug was in the test <g>).
Matthew Bloch
2012-06-07 02:06:08 +01:00
9fc3c061f8Fixed arguments to debug function.
Matthew Bloch
2012-06-07 01:15:29 +01:00
8cf1a515ddMissing break; in switch statement (verbose was setting default deny!)
Matthew Bloch
2012-06-07 00:01:11 +01:00
cfa9f9c71fFix the sense of client_serve_request
Alex Young
2012-06-06 14:25:35 +01:00
e8b47d5855Remove the accept lock as being unneeded
Alex Young
2012-06-06 14:07:55 +01:00
1fc76ad77fMerge
Alex Young
2012-06-06 13:44:49 +01:00
16001eb9ebMove checking for a closed client out of server_lock_io and into client_serve_request
Alex Young
2012-06-06 13:44:38 +01:00
648f768ff6tests: fix the Ruby flexnbd wrapper for mirror
nick
2012-06-06 13:33:24 +01:00
1b289a0e87Change io lock and unlock to server error on failure
Alex Young
2012-06-06 13:29:13 +01:00
9dbc0a31a8Better error message
Alex Young
2012-06-06 13:19:24 +01:00
339e766339Use self_pipe for close_signal
Alex Young
2012-06-06 12:41:03 +01:00
14c9468b68Automated merge with ssh://dev/flexnbd-c
nick
2012-06-06 12:35:18 +01:00
7544a59da1mirror: Add --bind to our mirror mode.
nick
2012-06-06 12:35:01 +01:00
f4a403842dflexnbd: Fix specifying -d as --default-deny on the command line
nick
2012-06-06 12:07:40 +01:00
457987664aRenamed struct client_params to struct client
Alex Young
2012-06-06 11:33:17 +01:00
40279bc9caSplit client-specific code into client.{c,h}
Alex Young
2012-06-06 11:27:52 +01:00
d22471d195Fix a \#define symbol
Alex Young
2012-06-06 10:55:50 +01:00
a80c5ce6b5Moved sockaddr_address_data to serve.c and renamed params.h to serve.h
Alex Young
2012-06-06 10:45:07 +01:00
cc97dd4842Rename control to control_fd and struct mode_serve_params to struct server
Alex Young
2012-06-06 10:35:50 +01:00
a0990b824cMerge
Alex Young
2012-06-06 10:24:33 +01:00
d7fa05d42cBacked out changeset 0cbb8e9cf515 because it breaks deb packaging.
Alex Young
2012-06-06 10:24:04 +01:00
78b1879cabMerge
Alex Young
2012-06-06 10:19:59 +01:00
059be22c27Rename int server to int server_fd in mode_serve_params
Alex Young
2012-06-06 10:19:45 +01:00
15513c03dfRemove a duplicated line due to the last merge
nick
2012-06-06 10:05:12 +01:00
682f3c70efAutomated merge with ssh://dev/flexnbd-c
nick
2012-06-06 10:03:46 +01:00
3e0628e2fcflexnbd: Re-add --sock to flexnbd mirror
nick
2012-06-06 09:55:47 +01:00
8a2fd06c31flexnbd: Add --bind to flexnbd read and flexnbd write
nick
2012-06-06 09:55:08 +01:00
60cb089e45Added fuzzer which currently exposes ugly bug with unaligned writes.
Matthew Bloch
2012-06-06 01:28:54 +01:00
d981dde8d1Fixed FlexNBD#serve parameters, added detection of non-starting server.
Matthew Bloch
2012-06-06 01:28:30 +01:00
2245385117Added msync() call after every write - not sure whether it's necessary yet.
Matthew Bloch
2012-06-06 01:27:37 +01:00
29151b8a78Isolated missing library code to pkg:deb task - couldn't locate library code (must be available from Debian, or bundled).
Matthew Bloch
2012-06-05 23:46:28 +01:00
d87d7a826fRename the 'debug' cli option 'verbose' and switch default-deny from 'D' to 'd'
Alex Young
2012-06-01 16:58:32 +01:00
8511cacb03Make sure the -d short option is honoured
Alex Young
2012-06-01 16:47:34 +01:00
29937cdcf9Merge
Alex Young
2012-06-01 16:25:41 +01:00
1ddb3bb609Add a self_pipe set of convenience functions
Alex Young
2012-06-01 16:25:27 +01:00
91ab715659Indentation fix
Alex Young
2012-06-01 16:24:50 +01:00
b985e97098Automated merge with ssh://dev/flexnbd-c
nick
2012-06-01 14:51:43 +01:00
04d67b3babacls: Add a default-deny option, which allows you to specify what an empty ACL means.
nick
2012-06-01 14:48:34 +01:00
9dbb107bf8Use nbdtypes to write the nbd hello message
Alex Young
2012-05-31 20:33:42 +01:00
17ed766c74Null-terminated strings strike again
Alex Young
2012-05-31 18:04:57 +01:00
185a840e03Factor out the bulk of client_serve_request, and add convenience converters in src/nbdtypes.c
Alex Young
2012-05-31 17:44:11 +01:00
949d7d6a72Don't check for the INCOMPLETE file on read
Alex Young
2012-05-31 14:11:57 +01:00
1aec12613cDitch a couple of unneeded variables to silence gcc warnings
Alex Young
2012-05-31 14:09:35 +01:00
b90b73fba6build and default rake tasks, because I keep trying to type them
Alex Young
2012-05-31 14:01:49 +01:00
49c4ef7c56Add .orig merge files to .hgignore
Alex Young
2012-05-31 13:55:35 +01:00
81fe41f016Merge
Alex Young
2012-05-31 13:53:21 +01:00
074efd9fa4Add a no-op debug() define for non-debug builds and make valgrind optional in nbd_scenarios
Alex Young
2012-05-31 13:53:04 +01:00
c2d1414bffMerge
Alex Young
2012-05-31 13:32:56 +01:00
623a398767Add a --debug flag for DEBUG builds
Alex Young
2012-05-31 13:31:22 +01:00
268bebd408Run the nbd_scenario tests under valgrind
Alex Young
2012-05-31 13:23:12 +01:00
71e755906bMake the Rakefile take note of DEBUG=
nick
2012-05-31 12:12:32 +01:00
e863bffe3dSet TCP_NODELAY on our socket. This decreases average NBD read request RTT from 0.3ms to 0.001ms
nick
2012-05-31 11:33:31 +01:00
cd976d1c2cFixed short copies of struct sockaddr (it's shorter than sockaddr_in6!) which was giving duff results when comparing IPv6 ACL entries.
mbloch
2012-05-30 20:13:56 +01:00
42599fe01eMake sure we build arch-specific packages
Alex Young
2012-05-30 18:11:32 +01:00
f21dd9e888Basic debian packaging
Alex Young
2012-05-30 17:35:07 +01:00
15c3133458Simplify option definition with som handy macros
Alex Young
2012-05-30 17:33:38 +01:00
fe08084144Added tag 0.0.1 for changeset 27409c2c1313
Alex Young
2012-05-30 17:11:10 +01:00
0102217019Merge
Alex Young
2012-05-30 15:39:55 +01:00
0c62e66a70Added getopt_long command-line handling.
Alex Young
2012-05-30 15:19:40 +01:00
a01621dc1eAdded .h files to the Rakefile
Alex Young
2012-05-30 15:06:06 +01:00
6d8afd1035Fixed bug where ACL was accidentally deleted when being set from control socket.
mbloch
2012-05-30 13:03:02 +01:00
46ceb85aecFix the usage message
nick
2012-05-30 11:28:32 +01:00
7832958522Rearranged the project to have src/ and build/ directories
Alex Young
2012-05-30 09:51:20 +01:00
cf2400feddFixed race in tests.
mbloch
2012-05-29 17:01:54 +01:00
21ccd17ea5Added .INCOMPLETE hack to aid with marking finished transfers.
Matthew Bloch
2012-05-29 11:24:24 +01:00
ab0dfb5ecaAdded mirror write barrier / final pass stuff & clean exit afterwards. Plenty of code documentation.
Matthew Bloch
2012-05-29 04:03:28 +01:00
dcb1633b8bLots of errors spotted by Alex fixed, added mutexes to accept & I/O, added "remote" commands to set ACL, start mirror etc.
mbloch
2012-05-29 00:59:12 +01:00
c54d4a68baAdded another write/read test, fixed bugs in splice() usage and IPv6 socket handling.
Matthew Bloch
2012-05-27 14:40:16 +01:00
5a5041a751First few external tests with test/unit, some minor tidying of internal data structures.
Matthew Bloch
2012-05-24 01:39:35 +01:00
d5d6e0f55dPulled some duplicated code out of control.c into read_lines_until_blankline.
mbloch
2012-05-23 14:03:30 +01:00
9c26f7f36fSplit control-socket functions into separate file.
Matthew Bloch
2012-05-23 00:42:14 +01:00
811e4ab2cdFixed mirroring to work (error reporting suspect though).
Matthew Bloch
2012-05-22 00:22:06 +01:00
7eaf5c3fd3Initial, 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.
Matthew Bloch
2012-05-21 04:03:17 +01:00
cd6e878673More valgrind-found bugs, extracted open_and_mmap from main code.
Matthew Bloch
2012-05-21 04:00:45 +01:00
43239feb38Fixed some uninitialised variables courtesy of valgrind.
Matthew Bloch
2012-05-21 03:59:43 +01:00
f7ce2c0ea5Mostly finished bitset tests, fixed test build to include utilities, remove efence as valgrind far preferable.
Matthew Bloch
2012-05-21 03:17:32 +01:00
c94b6f365cTweaks to bitset.h, established a C test framework.
Matthew Bloch
2012-05-20 14:38:46 +01:00
8a38cf48ebFixed segfaulting access control, allowed change to acl via control socket.
Matthew Bloch
2012-05-19 12:48:03 +01:00
580b821f61Added dummy control socket answering / changed serve_accept_loop to use select() to avoid a separate listening thread.
Matthew Bloch
2012-05-18 23:39:16 +01:00
b533e4e31cAdded control socket, doesn't do anything yet.
mbloch
2012-05-18 18:44:34 +01:00
f5d8e740f8Added .hgignore file
Matthew Bloch
2012-05-18 13:25:54 +01:00
ca53d6f270Stopped NBD writes from committing all-zero blocks to disc (tentative, needs further testing).
Matthew Bloch
2012-05-18 13:24:35 +01:00
0432fef8f5Split code out into separate compilation units (first pass, anyway).
Matthew Bloch
2012-05-17 20:14:22 +01:00
aec90e5244Non-functioning commit, half-way through adding sparse bitmap feature.
Matthew Bloch
2012-05-17 11:54:25 +01:00
f688d416a5Added write mode.
Matthew Bloch
2012-05-16 11:58:41 +01:00
b1aa942b3dAdded working read via splice syscall.
Matthew Bloch
2012-05-16 03:20:09 +01:00