flexnbd: Remove the server I/O lock from around NBD requests

NBD doesn't actually guarantee what happens if you have two
concurrent writes to overlapping areas of the disc, and this
mutex was causing us a near-deadlock when the TCP connection
died uncleanly, partway through a request. So now we don't
bother. This actually removes the last user of the server I/O
mutex, so we can remove it completely from the codebase in a
future commit.
This commit is contained in:
nick
2013-09-23 10:22:48 +01:00
parent 71036730c4
commit 9a3106f946

View File

@@ -560,7 +560,6 @@ int client_serve_request(struct client* client)
return client->disconnect;
}
server_lock_io( client->serve );
{
if ( !server_is_closed( client->serve ) ) {
/* We arm / disarm around client_reply() to catch cases where the
@@ -581,7 +580,6 @@ int client_serve_request(struct client* client)
stop = 0;
}
}
server_unlock_io( client->serve );
return stop;
@@ -616,7 +614,6 @@ void client_cleanup(struct client* client,
client->fileno = -1;
}
if ( server_io_locked( client->serve ) ) { server_unlock_io( client->serve ); }
if ( server_acl_locked( client->serve ) ) { server_unlock_acl( client->serve ); }
}