[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Nbd] [PATCH] Fix oversize writes to write to correct area of disk



Oversize writes were not incrementing the seek location for
writes. This could cause disk corruption.

Available from git.alex.org.uk as usual

-- 
Alex Bligh

Signed-off-by: Alex Bligh <alex@...872...>
---
 nbd-server.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/nbd-server.c b/nbd-server.c
index d57120b..41b847a 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -1576,6 +1576,7 @@ int mainloop(CLIENT *client) {
 					continue;
 				}
 				len -= currlen;
+				request.from += currlen;
 				currlen = (len < BUFSIZE) ? len : BUFSIZE;
 			}
 			SEND(client->net, reply);
-- 
1.7.4.1




Reply to: