Increase log level for readloop failures, which might help with diagnosis

This commit is contained in:
Patrick J Cherry
2018-02-09 11:57:07 +00:00
parent c4bab3f81f
commit 169d40f575
2 changed files with 4 additions and 3 deletions

1
debian/changelog vendored
View File

@@ -15,6 +15,7 @@ flexnbd (0.2.0) UNRELEASED; urgency=medium
* Proxy passes all NBD protocol errors through to the client instead of * Proxy passes all NBD protocol errors through to the client instead of
disconnecting and retrying (#36, !40) disconnecting and retrying (#36, !40)
* Ignore ends of discs that stray outside of 512-byte sector sizes (!42). * Ignore ends of discs that stray outside of 512-byte sector sizes (!42).
* Tweak logging for readloop failures (!44)
-- James Carter <james.carter@bytemark.co.uk> Thu, 11 Jan 2018 10:05:35 +0000 -- James Carter <james.carter@bytemark.co.uk> Thu, 11 Jan 2018 10:05:35 +0000

View File

@@ -228,14 +228,14 @@ int client_read_request( struct client * client , struct nbd_request *out_reques
*disconnected = 1; *disconnected = 1;
switch( errno ){ switch( errno ){
case 0: case 0:
debug( "EOF while reading request" ); warn( "EOF while reading request" );
return 0; return 0;
case ECONNRESET: case ECONNRESET:
debug( "Connection reset while" warn( "Connection reset while"
" reading request" ); " reading request" );
return 0; return 0;
case ETIMEDOUT: case ETIMEDOUT:
debug( "Connection timed out while" warn( "Connection timed out while"
" reading request" ); " reading request" );
return 0; return 0;
default: default: