diff options
author | Simon Rettberg | 2024-04-23 14:29:13 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-04-23 14:29:13 +0200 |
commit | 932bf4017c2732209a43e788ae808c69f88ff2e0 (patch) | |
tree | e9457e2577a03cf6937ea158201589bc92eefb0b | |
parent | [FUSE] Fix division by zero (diff) | |
download | dnbd3-932bf4017c2732209a43e788ae808c69f88ff2e0.tar.gz dnbd3-932bf4017c2732209a43e788ae808c69f88ff2e0.tar.xz dnbd3-932bf4017c2732209a43e788ae808c69f88ff2e0.zip |
[FUSE] Fix check for failed statsfile write
-rw-r--r-- | src/fuse/cowfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuse/cowfile.c b/src/fuse/cowfile.c index 4714402..b22d24a 100644 --- a/src/fuse/cowfile.c +++ b/src/fuse/cowfile.c @@ -479,7 +479,7 @@ static void updateCowStatsFile( uint64_t inQueue, uint64_t modified, uint64_t id ssize_t extra = MIN( 20, (ssize_t)sizeof(buffer) - len - 1 ); memset( buffer + len, '\n', extra ); lseek( cow.fdStats, 43, SEEK_SET ); - if ( write( cow.fdStats, buffer, len + extra ) != len ) { + if ( write( cow.fdStats, buffer, len + extra ) != len + extra ) { logadd( LOG_WARNING, "Could not update cow status file" ); } #ifdef COW_DUMP_BLOCK_UPLOADS |