summaryrefslogtreecommitdiffstats
path: root/src/fuse/connection.c
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-11 16:14:59 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commitef86f10d71bf2081b17025e0ea2ad020845233bc (patch)
tree360536a6be044397f88fced139c4db6bdfc8759c /src/fuse/connection.c
parent[FUSE] Rename COW API endpoints again (diff)
downloaddnbd3-ef86f10d71bf2081b17025e0ea2ad020845233bc.tar.gz
dnbd3-ef86f10d71bf2081b17025e0ea2ad020845233bc.tar.xz
dnbd3-ef86f10d71bf2081b17025e0ea2ad020845233bc.zip
[FUSE] More cleanup and minor fixes
- Add support for aborting session and further uploads via SIGQUIT - Make API versioned - Change it to "uuid" everywhere instead of a mix of uuid and guid - Server can now tell us to wait with further uploads - merge request is now urlencoded POST instead of mime data
Diffstat (limited to 'src/fuse/connection.c')
-rw-r--r--src/fuse/connection.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/fuse/connection.c b/src/fuse/connection.c
index 2264c00..dede680 100644
--- a/src/fuse/connection.c
+++ b/src/fuse/connection.c
@@ -960,15 +960,7 @@ static size_t receiveRequest(const int sock, dnbd3_async_t* request )
{
if( useCow ) {
cow_sub_request_t * cow_request = container_of( request, cow_sub_request_t, dRequest );
- // TODO This is ugly, we have a callback so we don't need to special-case receiving the
- // reply, yet here we check what the callback function is for some reason :-(
- // Ideally there should be no cow-related code in this file at all.
- // This requires moving the callback to dnbd3_async_t from cow_sub_request_t though...
- if( cow_request->callback == readRemoteData ) {
- return sock_recv( sock, cow_request->buffer, request->length );
- } else{
- return sock_recv( sock, &cow_request->writeBuffer, request->length );
- }
+ return sock_recv( sock, cow_request->buffer, request->length );
} else {
return sock_recv( sock, container_of( request, dnbd3_async_parent_t, request )->buffer, request->length );
}