Patrick J Cherry
1338d9e910
Fix up nbdtypes test to correctly use htobe64
...
Previous change hadn't taken this into account, and hopefully this makes
our test a little clearer.
2016-10-06 14:46:29 +01:00
Patrick J Cherry
191b3bc72c
Merge branch 'master' of gitlab.bytemark.co.uk:open-source/flexnbd-c into fix-check-readwrite
2016-10-06 14:06:21 +01:00
Patrick J Cherry
6505588f25
Fixed check_readwrite test to pass correct handle to fd_write_reply
...
The (char*) cast to resp->received.handle.b was causing a segfault
2016-10-06 14:01:47 +01:00
Patrick J Cherry
957707bcfc
Fixed up internal test names (copy/pasta?)
...
The test names output by `make check` now reflect reality.
2016-10-06 13:44:20 +01:00
James F. Carter
a09e14b2d4
whitespace fix
2016-10-05 11:06:39 +01:00
James F. Carter
a6710b6c32
update tests to reflect changes in handle storage
2016-10-05 10:57:52 +01:00
Michel Pollet
956a602475
Simplified NBD handle comparisons
...
8 bytes, therefore a uing64_t to compare to, no need for memcmp()
Signed-off-by: Michel Pollet <buserror@gmail.com >
2016-10-04 15:41:48 +01:00
Alex Young
77f333423b
Apply Michel's tidy-ups
2014-02-26 15:19:03 +00:00
nick
afcc07a181
Fix stop signal logic broken by the killswitch
2014-01-22 12:16:09 +00:00
nick
dcead04cf6
Fix up the check_util test once more
2014-01-22 12:10:34 +00:00
nick
976e9ba07f
Automated merge with ssh://dev.bytemark.co.uk//repos/flexnbd-c
2014-01-22 11:49:26 +00:00
nick
905d66af77
Rework a test
2014-01-22 11:45:35 +00:00
nick
ce5c51cdcf
Fix a test case
2014-01-22 11:40:19 +00:00
nick
866bf835e6
tests: Fix an uninitialized memory access
2013-10-30 22:46:49 +00:00
nick
78fc65c515
bitset: Rename bitset_stream_on/off as bitset_enable/disable_stream
2013-09-23 17:10:14 +01:00
nick
f4793c7059
bitset: Rename bitset_mapping to bitset
2013-09-23 16:58:40 +01:00
nick
847b2ec9ad
status: Remove useless stats
2013-09-23 14:19:49 +01:00
nick
ca9aea0d13
status: Expose migration_seconds_left
2013-09-23 14:09:25 +01:00
nick
0f2225becf
status: Display number of currently connected clients, and whether new clients are allowed
...
These will be useful for migration status monitoring - replaces "is pass == 7?"
2013-09-23 13:38:19 +01:00
nick
c3a5eb0600
bitset: add bitset_stream_size and bitset_stream_queued_bytes
2013-09-12 16:54:42 +01:00
nick
0a029fbbf5
bitset: Add an event stream implementation
...
Nothing is using it yet
2013-09-12 12:30:50 +01:00
nick
83426e1c01
tests: Update check_bitset to use new bitset_free() function
2013-09-11 16:09:27 +01:00
nick
385c9027db
flexnbd status: display mirror->max_bytes_per_second as mirror_speed_limit
2013-08-14 13:30:25 +01:00
nick
9f4fbe782c
Branch merge
2013-08-09 17:03:25 +01:00
nick
754949d43f
bitset: Add a bitset_run_count_ex that lets you learn the value of the bits in the run
2013-08-09 16:49:38 +01:00
lupine
1a966ca0be
bitset: Prove that bitset operations with len=0 don't underflow
2013-07-26 17:09:21 +01:00
nick
f590f8ed3c
status: Add migration_speed ( bytes per second ) and migration_duration( seconds ) to the migration output
2013-07-26 11:50:01 +01:00
nick
bc9ce93648
bitset: squash one more bug
2013-07-25 10:58:50 +01:00
nick
bed8959d47
bitset: Fix large runs
2013-07-24 17:42:08 +01:00
nick
253cee5a10
flexnbd: Acknowledge new return type of bitset_run_count
2013-07-24 15:08:29 +01:00
nick
d18423c153
tests: Fix a couple of compile warnings
2013-07-23 17:22:23 +01:00
nick
1b0fe24529
test: Add some tests for bitset_run_count
2013-07-23 17:13:40 +01:00
nick
afe76debf7
flexnbd status: Actually output pass statistics
2013-07-08 14:27:04 +01:00
nick
f4bfc70a4b
flexnbd status: Add current pass clean/dirty byte statistics
2013-07-08 13:51:15 +01:00
nick
b29ef6d4de
flexnbd status: Avoid a possible NULL dereference reading migration status
...
While the mirror mutex is taken, the mirroring can be abandoned and serve->mirror
set to NULL, so we need to lock around reading information from serve->mirror
2013-07-08 13:32:14 +01:00
nick
dee0bb27d6
flexnbd status: Add the size of the backing file, in bytes
...
This will be handy information if you're querying flexnbd for migration
stats, particularly.
2013-07-08 10:11:18 +01:00
nick
f556f298b1
flexnbd status: Add current migration pass to the status output if we're migrating
2013-07-08 09:58:31 +01:00
nick
55b452ebef
Fix tests for new killswitch argument
2013-07-03 10:04:08 +01:00
nick
2bb8434128
sockutil: Make sockaddr_address_string conform to its comment
2013-03-19 14:47:50 +00:00
nick
63f7e3e8d4
Fix some sockutil tests
2013-02-15 16:48:23 +00:00
nick
cb7eed28e7
sockutil: Add some tests for sockaddr_address_string
2013-02-13 15:07:30 +00:00
Alex Young
22bea81445
Don't open the control socket until after the server socket is bound
...
This makes it easier for the tests (and supervisor) to guarantee to be
able to connect to the server socket.
Also this patch moves freeing the mirror supervisor into the server
thread.
2012-10-09 17:35:20 +01:00
Alex Young
53eca40fad
Fix tests broken by entrust removal
...
Missed check_readwrite and check_flexnbd
2012-07-23 15:45:39 +01:00
Alex Young
4790912750
Remove listen mode
...
Changing behaviour so that instead of rebinding after a successful
migration and continuing as an ordinary server, we simply quit with a
0 exit code and let our caller restart us as a server if they want to.
This means that everything in listen.c, listen.h, and anything making
reference to a rebind address is unneeded.
2012-07-23 09:48:50 +01:00
Alex Young
2e20e7197a
Add the pid to the status output
...
This will be needed if we daemonise flexnbd.
2012-07-16 11:50:59 +01:00
Alex Young
2e4e592c08
Enable writing after the 2G boundary
...
This patch fixes a bug in readwrite.c which truncated the 'from' field
in nbd requests. It was casting them down from an off64_t to an int.
2012-07-12 18:01:10 +01:00
Alex Young
cef2dcaad2
Rename struct mirror_status to struct mirror
2012-07-12 14:54:48 +01:00
Alex Young
f3f017a87d
Free all possibly held mutexes in error handlers
...
Now that we have 3 mutexes lying around, it's important that we check
and free these if necessary if error() is called in any thread that can
hold them. To do this, we now have flexthread.c, which defines a
flexthread_mutex struct. This is a wrapper around a pthread_mutex_t and
a pthread_t. The idea is that in the error handler, the thread can
check whether it holds the mutex and can free it if and only if it does.
This is important because pthread fast mutexes can be freed by *any*
thread, not just the thread which holds them.
Note: it is only ever safe for a thread to check if it holds the mutex
itself. It is *never* safe to check if another thread holds a mutex
without first locking that mutex, which makes the whole operation rather
pointless.
2012-07-11 09:43:16 +01:00
Alex Young
c0c9c6f076
Moved unit tests into tests/unit
2012-07-03 10:53:08 +01:00