block.c (5f5bcd80f8c365bca1480dc39141952fa7f88c71) | block.c (e96126ffa53d36ec75a1ee900a6b7e7c82d9bb9c) |
---|---|
1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2226 unchanged lines hidden (view full) --- 2235 .overlap_bytes = bytes, 2236 }; 2237 2238 qemu_co_queue_init(&req->wait_queue); 2239 2240 QLIST_INSERT_HEAD(&bs->tracked_requests, req, list); 2241} 2242 | 1/* 2 * QEMU System Emulator block driver 3 * 4 * Copyright (c) 2003 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 2226 unchanged lines hidden (view full) --- 2235 .overlap_bytes = bytes, 2236 }; 2237 2238 qemu_co_queue_init(&req->wait_queue); 2239 2240 QLIST_INSERT_HEAD(&bs->tracked_requests, req, list); 2241} 2242 |
2243static void mark_request_serialising(BdrvTrackedRequest *req, size_t align) | 2243static void mark_request_serialising(BdrvTrackedRequest *req, uint64_t align) |
2244{ 2245 int64_t overlap_offset = req->offset & ~(align - 1); | 2244{ 2245 int64_t overlap_offset = req->offset & ~(align - 1); |
2246 int overlap_bytes = ROUND_UP(req->offset + req->bytes, align) 2247 - overlap_offset; | 2246 unsigned int overlap_bytes = ROUND_UP(req->offset + req->bytes, align) 2247 - overlap_offset; |
2248 2249 if (!req->serialising) { 2250 req->bs->serialising_in_flight++; 2251 req->serialising = true; 2252 } 2253 2254 req->overlap_offset = MIN(req->overlap_offset, overlap_offset); 2255 req->overlap_bytes = MAX(req->overlap_bytes, overlap_bytes); --- 3175 unchanged lines hidden --- | 2248 2249 if (!req->serialising) { 2250 req->bs->serialising_in_flight++; 2251 req->serialising = true; 2252 } 2253 2254 req->overlap_offset = MIN(req->overlap_offset, overlap_offset); 2255 req->overlap_bytes = MAX(req->overlap_bytes, overlap_bytes); --- 3175 unchanged lines hidden --- |