Skip to contentSkip to conversation

raw-win32.c: Fix incorrect handling behaviour of small block files

PATCH Applied Tal Kain 2 participants 2 messages Sep 9, 2013 Block layer

lore
Share & tools
lore

Tal Kain

author
#0 lore raw

PATCH 1/1 raw-win32.c: Fix incorrect handling behaviour of small block files

It is a valid case that the read data's size is smaller than the requested size since there could be files that are smaller than the minimum block size (For ex. when a VMDK disk descriptor file)

---
 block/raw-win32.c |    1 +
 1 file changed, 1 insertion(+)
block/raw-win32.c +1 -0
index 9b5b2af..bffbee8 100644
@@ -85,6 +85,7 @@ static size_t handle_aiocb_rw(RawWin32AIOData *aiocb)
             ret_count = 0;
         }
         if (ret_count != len) {
+            offset += ret_count;
             break;
         }
         offset += len;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw

Am 09.09.2013 um 11:14 hat Tal Kain geschrieben:

Quoted 5 lines

It is a valid case that the read data's size is smaller than the requested size since there could be files that are smaller than the minimum block size (For ex. when a VMDK disk descriptor file)

Thanks, applied to the block branch.

Kevin