From 60a6453012d026a18f9d2a15b843b2d0b178f5aa Mon Sep 17 00:00:00 2001 From: Sitsofe Wheeler Date: Sat, 3 Dec 2016 09:31:34 +0000 Subject: [PATCH] blktrace: Fix replay_align 32 bit truncation When using replay_align the aligned offset was truncated when the original offset was greater than 2^32. Fix this by forcing the calculation to happen with 64 bits. Signed-off-by: Sitsofe Wheeler --- blktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blktrace.c b/blktrace.c index deb8b2d6..dcddd4f2 100644 --- a/blktrace.c +++ b/blktrace.c @@ -221,7 +221,7 @@ static void ipo_bytes_align(struct thread_options *o, struct io_piece *ipo) if (!o->replay_align) return; - ipo->offset &= ~(o->replay_align - 1); + ipo->offset &= ~(o->replay_align - (uint64_t)1); } -- 2.25.1