summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2024-04-23 14:29:13 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commitb693a86fa87bdf001153d93e629425055a447897 (patch)
tree8435bc6e7c07a500d9afdbec9db2982fdc584fa3
parent[FUSE] Fix division by zero (diff)
downloaddnbd3-b693a86fa87bdf001153d93e629425055a447897.tar.gz
dnbd3-b693a86fa87bdf001153d93e629425055a447897.tar.xz
dnbd3-b693a86fa87bdf001153d93e629425055a447897.zip
[FUSE] Fix check for failed statsfile write
-rw-r--r--src/fuse/cowfile.c2
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