Commit Graph

458 Commits

Author SHA1 Message Date
Patrick J Cherry
4a709e73f8 Moved .hgignore to .gitignore 2016-08-30 21:47:25 +01:00
Patrick J Cherry
91a8946ddc Removed debian directory 2016-08-30 21:46:59 +01:00
nick
20f99b4554 flexnbd: We only require 1/8th of the memory we allocate for bitsets (bits vs. bytes confusion) 2015-05-13 09:25:09 +01:00
nick
c363991cfd Makefile: Add -lm to LLDFLAGS 2015-04-01 12:39:07 +01:00
Alex Young
c41eeff2fc Moved the server-specific files into src/server 2014-03-11 11:05:43 +00:00
Alex Young
5960e4d10b Remove the proxy's dependency on flexnbd.h 2014-03-11 10:37:00 +00:00
Alex Young
f0911b5c6c Tighten up some variable scopes. 2014-03-11 10:24:29 +00:00
Alex Young
b063f41ba8 Avoid a potential null pointer dereference 2014-03-11 09:57:19 +00:00
Alex Young
28c7e43e45 Fix a harmless buffer overflow 2014-03-11 09:49:25 +00:00
Alex Young
9326b6b882 Merge 2014-02-27 16:18:17 +00:00
Alex Young
f93476ebd3 Replace off64_t with uint64_t where it makes sense to do so.
It looks like off64_t was propagated through the code from the return
type of lseek64(), which isn't appropriate in many of the places we're
using it.
2014-02-27 16:04:25 +00:00
Alex Young
666b60ae1c Allow subset reads in prefetch_contains and prefetch_offset 2014-02-27 14:54:18 +00:00
nick
f48bf2b296 Automated merge with ssh://dev/flexnbd-c 2014-02-27 14:33:01 +00:00
nick
705164ae3b Cork/uncork in mirror - socket_connect already sets nodelay 2014-02-27 14:32:54 +00:00
nick
dbe7053bf3 Avoid some false positives 2014-02-27 14:32:26 +00:00
Alex Young
fa8023cf69 Proxy prefetch cache becomes a command-line argument. 2014-02-27 14:21:36 +00:00
nick
aba802d415 bitset: Allocate the right amount of memory
We were calculating the wrong number of words per byte in the first
place, and then passing the number of *words* to malloc, which expects
the number of *bytes*.

Fix both errors
2014-02-27 12:57:09 +00:00
Alex Young
d146102c2c Cherry-pick extra toolchain Makefile options 2014-02-26 15:56:41 +00:00
Alex Young
5551373073 Merge 2014-02-26 15:37:44 +00:00
Alex Young
77f333423b Apply Michel's tidy-ups 2014-02-26 15:19:03 +00:00
Alex Young
ffa45879d7 Pull back the changelog generation to the simplest thing that can possibly work 2014-02-25 17:24:25 +00:00
Alex Young
2fa1ce8e6b Tweak changelog generation not to skip commits since last tag 2014-02-25 16:35:51 +00:00
nick
6f540ce238 proxy: Turn on TCP_CORK
Now that we're using NODELAY, we should definitely use cork around
writes to the upstream server. This prevents each partial write()
from being its own packet, which would be terrible if it actually
happened with any regularity (we'd mostly see it when the kernel
is stressed, and write() is progressing a few bytes at a time as
a result)
2014-02-25 16:00:48 +00:00
nick
f9a3447bc9 proxy: Turn on TCP_NODELAY for the proxy->upstream leg
Nagle doesn't actually affect us too badly here, as we don't write
the header and then the data in two separate calls under normal
circumstances, which is the pathological case, but we should have
NODELAY on, regardless
2014-02-25 15:59:05 +00:00
nick
7806ec11ee client: cork/uncork around NBD_REQUEST_READ responses
We don't cork/uncork around NBD_REQUEST_WRITE responses because
they're only 16 bytes, and we're using blocking writes.
2014-02-25 15:45:41 +00:00
nick
1817c13acb sockutil: Add a tcp_cork helper 2014-02-25 15:44:46 +00:00
nick
97c8d7a358 Remove a compile-time optional selection of O_DIRECT (was never used)
The mmap() manpage tells us to avoid using O_DIRECT with mmap() - so
do so.
2014-02-24 13:47:29 +00:00
Alex Young
8cf92af900 Call srand() to make sure request handles are properly randomised 2014-02-24 12:20:50 +00:00
Alex Young
5185be39c9 Merge 2014-02-24 11:25:46 +00:00
Alex Young
374b4c616e Remove unreachable code to make -Wunreachable-code on clang useful. 2014-02-24 11:23:09 +00:00
Alex Young
50ec8fb7cc Depend on either libev4 or libev3, whichever is available 2014-02-24 11:22:26 +00:00
Alex Young
5fc9ad6fd8 Add some build-depends which make doc needs 2014-02-21 21:40:55 +00:00
Alex Young
85c463c4bd Add asciidoc as a Build-Depends 2014-02-21 20:46:44 +00:00
Alex Young
278a3151a8 Update Rakefile to generate debian/changelog.
`rake changelog` and a commit should be run after each `hg tag`.
2014-02-21 19:58:02 +00:00
Alex Young
0ea66b1e04 Added tag 0.1.1 for changeset 303f6859295d 2014-02-21 19:54:25 +00:00
Alex Young
83e3d65be9 Update the Makefile to work with dpkg-buildpackage 0.1.1 2014-02-21 19:39:27 +00:00
Alex Young
4f31bd9340 Switch from a rake-based build to a make-based build.
This commit beefs up the Makefile to do the build, instead of the
Rakefile.

It also removes from the Rakefile the dependency on rake_utils, which
should mean it's ok to build in a schroot.

The files are reorganised to make the Makefile rules more tractable,
although the reorganisation reveals a problem with our current code
organisation.

The problem is that the proxy-specific code transitively depends on the
server code via flexnbd.h, which has a circular dependency on the server
and client structs. This should be broken in a future commit by
separating the flexnbd struct into a shared config struct and
server-specific parts, so that the server code can be moved into
src/server to more accurately show the functional dependencies.
2014-02-21 19:10:55 +00:00
nick
0baf93fd7b proxy: Fix a read corruption issue caused by us failing to reset needles on timeout 2014-02-11 20:43:44 +00:00
nick
175f19b3e7 client: Add a cork TODO pair 2014-02-11 15:22:54 +00:00
nick
8d56316548 client: Start checking for exceptions on the client socket 2014-02-11 14:32:12 +00:00
nick
27f2cc7083 Some debug and whitespace tweaks 2014-02-11 14:31:58 +00:00
nick
8084a41ad2 flexnbd client: Catch a few cases where the killswitch wasn't disarmed 2014-01-28 11:45:27 +00:00
nick
5ca5858929 Increase a timeout on a test to handle slow unlink calls on other filesystems 2014-01-22 12:21:49 +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
4f7f5f1745 Fix a few dangling bits in client.h 2014-01-22 12:01:42 +00:00
nick
976e9ba07f Automated merge with ssh://dev.bytemark.co.uk//repos/flexnbd-c 2014-01-22 11:49:26 +00:00
nick
91d9531a60 flexnbd serve: Make the killswitch per-client-thread
This is a bit tricky, but calling shutdown() on a socket in a signal
handler is safe, and (at least in linux) appears to cause any read()
or write() calls blocked on that socket to return, even with SA_RESTART.

I'm not confident enough about the rest of flexnbd's syscall error
handling to turn SA_RESTART off for this signal...
2014-01-22 11:49:21 +00:00
nick
905d66af77 Rework a test 2014-01-22 11:45:35 +00:00
nick
eee7c9644c Another fedora build fix 2014-01-22 11:42:00 +00:00