diff options
author | Simon Rettberg | 2018-06-13 15:44:07 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-06-13 15:44:07 +0200 |
commit | 2f93678ed8f7bd79c4d6de05dc5f3e3c24361c44 (patch) | |
tree | 8348125e340e8ecad50e450408a2fb8a93159d5a | |
parent | [SERVER] Print info about signal sender (diff) | |
download | dnbd3-2f93678ed8f7bd79c4d6de05dc5f3e3c24361c44.tar.gz dnbd3-2f93678ed8f7bd79c4d6de05dc5f3e3c24361c44.tar.xz dnbd3-2f93678ed8f7bd79c4d6de05dc5f3e3c24361c44.zip |
[FUSE] Move variables into block where they're being used
-rw-r--r-- | src/fuse/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fuse/main.c b/src/fuse/main.c index adf7b23..b064a9b 100644 --- a/src/fuse/main.c +++ b/src/fuse/main.c @@ -165,11 +165,11 @@ static int image_read(const char *path, char *buf, size_t size, off_t offset, st size = imageSize - offset; } - /* count the requested blocks */ - uint64_t startBlock = offset / ( 4096 ); - const uint64_t endBlock = ( offset + size - 1 ) / ( 4096 ); - if ( useDebug ) { + /* count the requested blocks */ + uint64_t startBlock = offset / ( 4096 ); + const uint64_t endBlock = ( offset + size - 1 ) / ( 4096 ); + for ( ; startBlock <= endBlock; startBlock++ ) { ++logInfo.blockRequestCount[startBlock]; } |